Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(881)

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_views_touch.cc

Issue 7395020: Create new GLSurface for cross process image transport. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "" Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/renderer_host/render_widget_host_view_views.h" 5 #include "chrome/browser/renderer_host/render_widget_host_view_views.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/renderer_host/accelerated_surface_container_touch.h" 8 #include "chrome/browser/renderer_host/accelerated_surface_container_touch.h"
9 #include "content/browser/renderer_host/render_widget_host.h" 9 #include "content/browser/renderer_host/render_widget_host.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFact ory.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFact ory.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 gfx::PluginWindowHandle RenderWidgetHostViewViews::GetCompositingSurface() { 193 gfx::PluginWindowHandle RenderWidgetHostViewViews::GetCompositingSurface() {
194 // On TOUCH_UI builds, the GPU process renders to an offscreen surface 194 // On TOUCH_UI builds, the GPU process renders to an offscreen surface
195 // (created by the GPU process), which is later displayed by the browser. 195 // (created by the GPU process), which is later displayed by the browser.
196 // As the GPU process creates this surface, we can return any non-zero value. 196 // As the GPU process creates this surface, we can return any non-zero value.
197 return 1; 197 return 1;
198 } 198 }
199 199
200 void RenderWidgetHostViewViews::AcceleratedSurfaceSetIOSurface( 200 void RenderWidgetHostViewViews::AcceleratedSurfaceSetIOSurface(
201 int32 width, int32 height, uint64 surface_id) { 201 int32 width, int32 height, uint64 surface_id) {
202 accelerated_surface_containers_[surface_id] = 202 accelerated_surface_containers_[surface_id] =
203 new AcceleratedSurfaceContainerTouch( 203 AcceleratedSurfaceContainerTouch::CreateAcceleratedSurfaceContainer(
204 static_cast<ui::CompositorGL*>(GetWidget()->GetCompositor()), 204 static_cast<ui::CompositorGL*>(GetWidget()->GetCompositor()),
205 gfx::Size(width, height), 205 gfx::Size(width, height),
206 surface_id); 206 surface_id);
207 } 207 }
208 208
209 void RenderWidgetHostViewViews::AcceleratedSurfaceRelease(uint64 surface_id) { 209 void RenderWidgetHostViewViews::AcceleratedSurfaceRelease(uint64 surface_id) {
210 accelerated_surface_containers_.erase(surface_id); 210 accelerated_surface_containers_.erase(surface_id);
211 } 211 }
212 212
213 void RenderWidgetHostViewViews::AcceleratedSurfaceBuffersSwapped( 213 void RenderWidgetHostViewViews::AcceleratedSurfaceBuffersSwapped(
214 uint64 surface_id) { 214 uint64 surface_id) {
215 SetExternalTexture(accelerated_surface_containers_[surface_id].get()); 215 SetExternalTexture(accelerated_surface_containers_[surface_id].get());
216 glFlush(); 216 glFlush();
217 } 217 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/accelerated_surface_container_touch.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698