OLD | NEW |
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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 if (!view) | 403 if (!view) |
404 return; | 404 return; |
405 | 405 |
406 view->AcceleratedSurfaceSuspend(); | 406 view->AcceleratedSurfaceSuspend(); |
407 } | 407 } |
408 | 408 |
409 #if defined(USE_AURA) | 409 #if defined(USE_AURA) |
410 | 410 |
411 void GpuProcessHostUIShim::OnAcceleratedSurfaceRelease( | 411 void GpuProcessHostUIShim::OnAcceleratedSurfaceRelease( |
412 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params) { | 412 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params) { |
| 413 bool success = false; |
| 414 |
413 RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID( | 415 RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID( |
414 params.surface_id); | 416 params.surface_id); |
415 if (!view) | 417 if (view) |
416 return; | 418 success = view->AcceleratedSurfaceRelease(params.identifier); |
417 view->AcceleratedSurfaceRelease(params.identifier); | 419 |
| 420 Send(new AcceleratedSurfaceMsg_ReleaseACK(params.route_id, |
| 421 params.identifier, |
| 422 success)); |
418 } | 423 } |
419 | 424 |
420 #endif | 425 #endif |
OLD | NEW |