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/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 params.size = GetSize(); | 200 params.size = GetSize(); |
201 params.latency_info = latency_info_; | 201 params.latency_info = latency_info_; |
202 | 202 |
203 helper_->SendAcceleratedSurfaceBuffersSwapped(params); | 203 helper_->SendAcceleratedSurfaceBuffersSwapped(params); |
204 | 204 |
205 DCHECK(!is_swap_buffers_pending_); | 205 DCHECK(!is_swap_buffers_pending_); |
206 is_swap_buffers_pending_ = true; | 206 is_swap_buffers_pending_ = true; |
207 } | 207 } |
208 | 208 |
209 void PbufferImageTransportSurface::OnBufferPresented( | 209 void PbufferImageTransportSurface::OnBufferPresented( |
210 const AcceleratedSurfaceMsg_BufferPresented_Params& /* params */) { | 210 const AcceleratedSurfaceMsg_BufferPresented_Params& params) { |
| 211 helper_->SendUpdateVSyncParameters(params.vsync_timebase, |
| 212 params.vsync_interval); |
211 is_swap_buffers_pending_ = false; | 213 is_swap_buffers_pending_ = false; |
212 if (did_unschedule_) { | 214 if (did_unschedule_) { |
213 did_unschedule_ = false; | 215 did_unschedule_ = false; |
214 helper_->SetScheduled(true); | 216 helper_->SetScheduled(true); |
215 } | 217 } |
216 } | 218 } |
217 | 219 |
218 void PbufferImageTransportSurface::OnResizeViewACK() { | 220 void PbufferImageTransportSurface::OnResizeViewACK() { |
219 NOTREACHED(); | 221 NOTREACHED(); |
220 } | 222 } |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 | 274 |
273 scoped_refptr<gfx::GLSurface> surface = | 275 scoped_refptr<gfx::GLSurface> surface = |
274 gfx::GLSurface::CreateViewGLSurface(handle.handle); | 276 gfx::GLSurface::CreateViewGLSurface(handle.handle); |
275 if (!surface) | 277 if (!surface) |
276 return surface; | 278 return surface; |
277 return scoped_refptr<gfx::GLSurface>(new PassThroughImageTransportSurface( | 279 return scoped_refptr<gfx::GLSurface>(new PassThroughImageTransportSurface( |
278 manager, stub, surface.get(), handle.is_transport())); | 280 manager, stub, surface.get(), handle.is_transport())); |
279 } | 281 } |
280 | 282 |
281 } // namespace content | 283 } // namespace content |
OLD | NEW |