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

Side by Side Diff: content/common/gpu/image_transport_surface.h

Issue 11195011: Send vsync timebase updates to the browser compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased again. Created 8 years, 1 month 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') | content/common/gpu/image_transport_surface.cc » ('j') | 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 #ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ 5 #ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_
6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ 6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_
7 7
8 #if defined(ENABLE_GPU) 8 #if defined(ENABLE_GPU)
9 9
10 #include <vector> 10 #include <vector>
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // like size and surface id. The helper fills in the rest. 107 // like size and surface id. The helper fills in the rest.
108 void SendAcceleratedSurfaceNew( 108 void SendAcceleratedSurfaceNew(
109 GpuHostMsg_AcceleratedSurfaceNew_Params params); 109 GpuHostMsg_AcceleratedSurfaceNew_Params params);
110 void SendAcceleratedSurfaceBuffersSwapped( 110 void SendAcceleratedSurfaceBuffersSwapped(
111 GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params); 111 GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params);
112 void SendAcceleratedSurfacePostSubBuffer( 112 void SendAcceleratedSurfacePostSubBuffer(
113 GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params params); 113 GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params params);
114 void SendAcceleratedSurfaceRelease( 114 void SendAcceleratedSurfaceRelease(
115 GpuHostMsg_AcceleratedSurfaceRelease_Params params); 115 GpuHostMsg_AcceleratedSurfaceRelease_Params params);
116 void SendResizeView(const gfx::Size& size); 116 void SendResizeView(const gfx::Size& size);
117 void SendUpdateVSyncParameters(
118 base::TimeTicks timebase, base::TimeDelta interval);
117 119
118 // Whether or not we should execute more commands. 120 // Whether or not we should execute more commands.
119 void SetScheduled(bool is_scheduled); 121 void SetScheduled(bool is_scheduled);
120 122
121 void DeferToFence(base::Closure task); 123 void DeferToFence(base::Closure task);
122 124
123 void SetPreemptByCounter( 125 void SetPreemptByCounter(
124 scoped_refptr<gpu::RefCountedCounter> preempt_by_counter); 126 scoped_refptr<gpu::RefCountedCounter> preempt_by_counter);
125 127
126 // Make the surface's context current. 128 // Make the surface's context current.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 // ImageTransportSurface implementation. 181 // ImageTransportSurface implementation.
180 virtual void OnBufferPresented(bool presented, 182 virtual void OnBufferPresented(bool presented,
181 uint32 sync_point) OVERRIDE; 183 uint32 sync_point) OVERRIDE;
182 virtual void OnResizeViewACK() OVERRIDE; 184 virtual void OnResizeViewACK() OVERRIDE;
183 virtual void OnResize(gfx::Size size) OVERRIDE; 185 virtual void OnResize(gfx::Size size) OVERRIDE;
184 virtual gfx::Size GetSize() OVERRIDE; 186 virtual gfx::Size GetSize() OVERRIDE;
185 187
186 protected: 188 protected:
187 virtual ~PassThroughImageTransportSurface(); 189 virtual ~PassThroughImageTransportSurface();
188 190
191 // If updated vsync parameters can be determined, send this information to
192 // the browser.
193 virtual void SendVSyncUpdateIfAvailable();
194
189 private: 195 private:
190 scoped_ptr<ImageTransportHelper> helper_; 196 scoped_ptr<ImageTransportHelper> helper_;
191 gfx::Size new_size_; 197 gfx::Size new_size_;
192 bool transport_; 198 bool transport_;
193 bool did_set_swap_interval_; 199 bool did_set_swap_interval_;
194 200
195 DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface); 201 DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface);
196 }; 202 };
197 203
198 } // namespace content 204 } // namespace content
199 205
200 #endif // defined(ENABLE_GPU) 206 #endif // defined(ENABLE_GPU)
201 207
202 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ 208 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | content/common/gpu/image_transport_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698