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 #if defined(ENABLE_GPU) | 5 #if defined(ENABLE_GPU) |
6 | 6 |
7 #include "content/common/gpu/image_transport_surface.h" | 7 #include "content/common/gpu/image_transport_surface.h" |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 IPC_MESSAGE_HANDLER(AcceleratedSurfaceMsg_ResizeViewACK, OnResizeViewACK); | 99 IPC_MESSAGE_HANDLER(AcceleratedSurfaceMsg_ResizeViewACK, OnResizeViewACK); |
100 IPC_MESSAGE_UNHANDLED(handled = false) | 100 IPC_MESSAGE_UNHANDLED(handled = false) |
101 IPC_END_MESSAGE_MAP() | 101 IPC_END_MESSAGE_MAP() |
102 return handled; | 102 return handled; |
103 } | 103 } |
104 | 104 |
105 void ImageTransportHelper::SendAcceleratedSurfaceNew( | 105 void ImageTransportHelper::SendAcceleratedSurfaceNew( |
106 GpuHostMsg_AcceleratedSurfaceNew_Params params) { | 106 GpuHostMsg_AcceleratedSurfaceNew_Params params) { |
107 params.surface_id = stub_->surface_id(); | 107 params.surface_id = stub_->surface_id(); |
108 params.route_id = route_id_; | 108 params.route_id = route_id_; |
109 #if defined(OS_MACOSX) | |
110 params.window = handle_; | |
111 #endif | |
112 manager_->Send(new GpuHostMsg_AcceleratedSurfaceNew(params)); | 109 manager_->Send(new GpuHostMsg_AcceleratedSurfaceNew(params)); |
113 } | 110 } |
114 | 111 |
115 void ImageTransportHelper::SendAcceleratedSurfaceBuffersSwapped( | 112 void ImageTransportHelper::SendAcceleratedSurfaceBuffersSwapped( |
116 GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params) { | 113 GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params) { |
117 // TRACE_EVENT for gpu tests: | 114 // TRACE_EVENT for gpu tests: |
118 TRACE_EVENT_INSTANT2("test_gpu", "SwapBuffers", | 115 TRACE_EVENT_INSTANT2("test_gpu", "SwapBuffers", |
119 "GLImpl", static_cast<int>(gfx::GetGLImplementation()), | 116 "GLImpl", static_cast<int>(gfx::GetGLImplementation()), |
120 "width", params.size.width()); | 117 "width", params.size.width()); |
121 params.surface_id = stub_->surface_id(); | 118 params.surface_id = stub_->surface_id(); |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 | 340 |
344 void PassThroughImageTransportSurface::SendVSyncUpdateIfAvailable() { | 341 void PassThroughImageTransportSurface::SendVSyncUpdateIfAvailable() { |
345 GetVSyncParameters( | 342 GetVSyncParameters( |
346 base::Bind(&ImageTransportHelper::SendUpdateVSyncParameters, | 343 base::Bind(&ImageTransportHelper::SendUpdateVSyncParameters, |
347 helper_->AsWeakPtr())); | 344 helper_->AsWeakPtr())); |
348 } | 345 } |
349 | 346 |
350 } // namespace content | 347 } // namespace content |
351 | 348 |
352 #endif // defined(ENABLE_GPU) | 349 #endif // defined(ENABLE_GPU) |
OLD | NEW |