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

Side by Side Diff: content/browser/gpu/gpu_process_host_ui_shim.cc

Issue 10735010: 3D Compositing in <browser>, first draft. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Use the correct baseline Created 8 years, 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/gpu/gpu_process_host_ui_shim.h" 5 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 gfx::Size size) { 245 gfx::Size size) {
246 // Always respond even if the window no longer exists. The GPU process cannot 246 // Always respond even if the window no longer exists. The GPU process cannot
247 // make progress on the resizing command buffer until it receives the 247 // make progress on the resizing command buffer until it receives the
248 // response. 248 // response.
249 ScopedSendOnIOThread delayed_send( 249 ScopedSendOnIOThread delayed_send(
250 host_id_, 250 host_id_,
251 new AcceleratedSurfaceMsg_ResizeViewACK(route_id)); 251 new AcceleratedSurfaceMsg_ResizeViewACK(route_id));
252 252
253 RenderWidgetHostViewPort* view = 253 RenderWidgetHostViewPort* view =
254 GetRenderWidgetHostViewFromSurfaceID(surface_id); 254 GetRenderWidgetHostViewFromSurfaceID(surface_id);
255 if (!view) 255 if (!view || !view->ResizeNeedsNewSurface())
256 return; 256 return;
257 257
258 gfx::GLSurfaceHandle surface = view->GetCompositingSurface(); 258 gfx::GLSurfaceHandle surface = view->GetCompositingSurface();
259 259
260 // Resize the window synchronously. The GPU process must not issue GL 260 // Resize the window synchronously. The GPU process must not issue GL
261 // calls on the command buffer until the window is the size it expects it 261 // calls on the command buffer until the window is the size it expects it
262 // to be. 262 // to be.
263 #if defined(TOOLKIT_GTK) 263 #if defined(TOOLKIT_GTK)
264 GdkWindow* window = reinterpret_cast<GdkWindow*>( 264 GdkWindow* window = reinterpret_cast<GdkWindow*>(
265 gdk_xid_table_lookup(surface.handle)); 265 gdk_xid_table_lookup(surface.handle));
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 } 360 }
361 361
362 void GpuProcessHostUIShim::OnAcceleratedSurfaceRelease( 362 void GpuProcessHostUIShim::OnAcceleratedSurfaceRelease(
363 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params) { 363 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params) {
364 RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID( 364 RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID(
365 params.surface_id); 365 params.surface_id);
366 if (!view) 366 if (!view)
367 return; 367 return;
368 view->AcceleratedSurfaceRelease(params.identifier); 368 view->AcceleratedSurfaceRelease(params.identifier);
369 } 369 }
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | content/browser/renderer_host/gpu_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698