Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: content/common/gpu/image_transport_surface_win.cc

Issue 23843005: Report accelerated surface vsync time info to browser compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698