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

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

Issue 10052018: Drop frontbuffers with ui-use-gpu-process, synchronized with browser, decoupled from backbuffer dro… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixing nits Created 8 years, 6 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) 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 302
303 RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID( 303 RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID(
304 params.surface_id); 304 params.surface_id);
305 if (!view) 305 if (!view)
306 return; 306 return;
307 307
308 uint64 surface_handle = params.surface_handle; 308 uint64 surface_handle = params.surface_handle;
309 TransportDIB::Handle shm_handle = TransportDIB::DefaultHandleValue(); 309 TransportDIB::Handle shm_handle = TransportDIB::DefaultHandleValue();
310 310
311 view->AcceleratedSurfaceNew( 311 view->AcceleratedSurfaceNew(
312 params.width, params.height, &surface_handle, &shm_handle); 312 params.width,
313 params.height,
314 &surface_handle,
315 &shm_handle,
316 params.route_id);
313 delayed_send.Cancel(); 317 delayed_send.Cancel();
314 Send(new AcceleratedSurfaceMsg_NewACK( 318 Send(new AcceleratedSurfaceMsg_NewACK(
315 params.route_id, surface_handle, shm_handle)); 319 params.route_id, surface_handle, shm_handle));
316 } 320 }
317 321
318 #endif 322 #endif
319 323
320 static base::TimeDelta GetSwapDelay() { 324 static base::TimeDelta GetSwapDelay() {
321 CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 325 CommandLine* cmd_line = CommandLine::ForCurrentProcess();
322 int delay = 0; 326 int delay = 0;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 void GpuProcessHostUIShim::OnAcceleratedSurfaceRelease( 392 void GpuProcessHostUIShim::OnAcceleratedSurfaceRelease(
389 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params) { 393 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params) {
390 RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID( 394 RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID(
391 params.surface_id); 395 params.surface_id);
392 if (!view) 396 if (!view)
393 return; 397 return;
394 view->AcceleratedSurfaceRelease(params.identifier); 398 view->AcceleratedSurfaceRelease(params.identifier);
395 } 399 }
396 400
397 #endif 401 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698