Chromium Code Reviews| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 106 manager_->Send(new GpuHostMsg_AcceleratedSurfaceBuffersSwapped(params)); | 106 manager_->Send(new GpuHostMsg_AcceleratedSurfaceBuffersSwapped(params)); |
| 107 } | 107 } |
| 108 | 108 |
| 109 void ImageTransportHelper::SendUpdateVSyncParameters( | 109 void ImageTransportHelper::SendUpdateVSyncParameters( |
| 110 base::TimeTicks timebase, base::TimeDelta interval) { | 110 base::TimeTicks timebase, base::TimeDelta interval) { |
| 111 manager_->Send(new GpuHostMsg_UpdateVSyncParameters(stub_->surface_id(), | 111 manager_->Send(new GpuHostMsg_UpdateVSyncParameters(stub_->surface_id(), |
| 112 timebase, | 112 timebase, |
| 113 interval)); | 113 interval)); |
| 114 } | 114 } |
| 115 | 115 |
| 116 void ImageTransportHelper::SendLatencyInfo( | 116 void ImageTransportHelper::SendLatencyInfo( |
|
piman
2014/10/07 02:30:39
nit: maybe we should rename this as SwapBuffersCom
no sievers
2014/10/07 19:47:24
Done.
| |
| 117 const std::vector<ui::LatencyInfo>& latency_info) { | 117 const std::vector<ui::LatencyInfo>& latency_info) { |
| 118 manager_->Send(new GpuHostMsg_FrameDrawn(latency_info)); | 118 stub_->SwapBuffersCompleted(latency_info); |
| 119 } | 119 } |
| 120 | 120 |
| 121 void ImageTransportHelper::SetScheduled(bool is_scheduled) { | 121 void ImageTransportHelper::SetScheduled(bool is_scheduled) { |
| 122 gpu::GpuScheduler* scheduler = Scheduler(); | 122 gpu::GpuScheduler* scheduler = Scheduler(); |
| 123 if (!scheduler) | 123 if (!scheduler) |
| 124 return; | 124 return; |
| 125 | 125 |
| 126 scheduler->SetScheduled(is_scheduled); | 126 scheduler->SetScheduled(is_scheduled); |
| 127 } | 127 } |
| 128 | 128 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 286 void PassThroughImageTransportSurface::SendVSyncUpdateIfAvailable() { | 286 void PassThroughImageTransportSurface::SendVSyncUpdateIfAvailable() { |
| 287 gfx::VSyncProvider* vsync_provider = GetVSyncProvider(); | 287 gfx::VSyncProvider* vsync_provider = GetVSyncProvider(); |
| 288 if (vsync_provider) { | 288 if (vsync_provider) { |
| 289 vsync_provider->GetVSyncParameters( | 289 vsync_provider->GetVSyncParameters( |
| 290 base::Bind(&ImageTransportHelper::SendUpdateVSyncParameters, | 290 base::Bind(&ImageTransportHelper::SendUpdateVSyncParameters, |
| 291 helper_->AsWeakPtr())); | 291 helper_->AsWeakPtr())); |
| 292 } | 292 } |
| 293 } | 293 } |
| 294 | 294 |
| 295 } // namespace content | 295 } // namespace content |
| OLD | NEW |