| 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/common/gpu/image_transport_surface.h" | 5 #include "content/common/gpu/image_transport_surface.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 IPC_MESSAGE_HANDLER(AcceleratedSurfaceMsg_ResizeViewACK, OnResizeViewACK); | 61 IPC_MESSAGE_HANDLER(AcceleratedSurfaceMsg_ResizeViewACK, OnResizeViewACK); |
| 62 IPC_MESSAGE_UNHANDLED(handled = false) | 62 IPC_MESSAGE_UNHANDLED(handled = false) |
| 63 IPC_END_MESSAGE_MAP() | 63 IPC_END_MESSAGE_MAP() |
| 64 return handled; | 64 return handled; |
| 65 } | 65 } |
| 66 | 66 |
| 67 void ImageTransportHelper::SendAcceleratedSurfaceBuffersSwapped( | 67 void ImageTransportHelper::SendAcceleratedSurfaceBuffersSwapped( |
| 68 GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params) { | 68 GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params) { |
| 69 // TRACE_EVENT for gpu tests: | 69 // TRACE_EVENT for gpu tests: |
| 70 TRACE_EVENT_INSTANT2("test_gpu", "SwapBuffers", | 70 TRACE_EVENT_INSTANT2("test_gpu", "SwapBuffers", |
| 71 TRACE_EVENT_SCOPE_THREAD, |
| 71 "GLImpl", static_cast<int>(gfx::GetGLImplementation()), | 72 "GLImpl", static_cast<int>(gfx::GetGLImplementation()), |
| 72 "width", params.size.width()); | 73 "width", params.size.width()); |
| 73 params.surface_id = stub_->surface_id(); | 74 params.surface_id = stub_->surface_id(); |
| 74 params.route_id = route_id_; | 75 params.route_id = route_id_; |
| 75 #if defined(OS_MACOSX) | 76 #if defined(OS_MACOSX) |
| 76 params.window = handle_; | 77 params.window = handle_; |
| 77 #endif | 78 #endif |
| 78 manager_->Send(new GpuHostMsg_AcceleratedSurfaceBuffersSwapped(params)); | 79 manager_->Send(new GpuHostMsg_AcceleratedSurfaceBuffersSwapped(params)); |
| 79 } | 80 } |
| 80 | 81 |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 void PassThroughImageTransportSurface::SendVSyncUpdateIfAvailable() { | 302 void PassThroughImageTransportSurface::SendVSyncUpdateIfAvailable() { |
| 302 gfx::VSyncProvider* vsync_provider = GetVSyncProvider(); | 303 gfx::VSyncProvider* vsync_provider = GetVSyncProvider(); |
| 303 if (vsync_provider) { | 304 if (vsync_provider) { |
| 304 vsync_provider->GetVSyncParameters( | 305 vsync_provider->GetVSyncParameters( |
| 305 base::Bind(&ImageTransportHelper::SendUpdateVSyncParameters, | 306 base::Bind(&ImageTransportHelper::SendUpdateVSyncParameters, |
| 306 helper_->AsWeakPtr())); | 307 helper_->AsWeakPtr())); |
| 307 } | 308 } |
| 308 } | 309 } |
| 309 | 310 |
| 310 } // namespace content | 311 } // namespace content |
| OLD | NEW |