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

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

Issue 11194042: Implement TextureImageTransportSurface using texture mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 279
280 #endif 280 #endif
281 281
282 void GpuProcessHostUIShim::OnAcceleratedSurfaceNew( 282 void GpuProcessHostUIShim::OnAcceleratedSurfaceNew(
283 const GpuHostMsg_AcceleratedSurfaceNew_Params& params) { 283 const GpuHostMsg_AcceleratedSurfaceNew_Params& params) {
284 RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID( 284 RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID(
285 params.surface_id); 285 params.surface_id);
286 if (!view) 286 if (!view)
287 return; 287 return;
288 view->AcceleratedSurfaceNew( 288 view->AcceleratedSurfaceNew(
289 params.width, params.height, params.surface_handle); 289 params.width, params.height, params.surface_handle,
290 params.mailbox_name);
290 } 291 }
291 292
292 static base::TimeDelta GetSwapDelay() { 293 static base::TimeDelta GetSwapDelay() {
293 CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 294 CommandLine* cmd_line = CommandLine::ForCurrentProcess();
294 int delay = 0; 295 int delay = 0;
295 if (cmd_line->HasSwitch(switches::kGpuSwapDelay)) { 296 if (cmd_line->HasSwitch(switches::kGpuSwapDelay)) {
296 base::StringToInt(cmd_line->GetSwitchValueNative( 297 base::StringToInt(cmd_line->GetSwitchValueNative(
297 switches::kGpuSwapDelay).c_str(), &delay); 298 switches::kGpuSwapDelay).c_str(), &delay);
298 } 299 }
299 return base::TimeDelta::FromMilliseconds(delay); 300 return base::TimeDelta::FromMilliseconds(delay);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 if (!view) 363 if (!view)
363 return; 364 return;
364 view->AcceleratedSurfaceRelease(params.identifier); 365 view->AcceleratedSurfaceRelease(params.identifier);
365 } 366 }
366 367
367 void GpuProcessHostUIShim::OnVideoMemoryUsageStatsReceived( 368 void GpuProcessHostUIShim::OnVideoMemoryUsageStatsReceived(
368 const content::GPUVideoMemoryUsageStats& video_memory_usage_stats) { 369 const content::GPUVideoMemoryUsageStats& video_memory_usage_stats) {
369 GpuDataManagerImpl::GetInstance()->UpdateVideoMemoryUsageStats( 370 GpuDataManagerImpl::GetInstance()->UpdateVideoMemoryUsageStats(
370 video_memory_usage_stats); 371 video_memory_usage_stats);
371 } 372 }
372
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698