| 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 #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 Loading... |
| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 180 |
| 179 // ImageTransportSurface implementation. | 181 // ImageTransportSurface implementation. |
| 180 virtual void OnBufferPresented(uint32 sync_point) OVERRIDE; | 182 virtual void OnBufferPresented(uint32 sync_point) OVERRIDE; |
| 181 virtual void OnResizeViewACK() OVERRIDE; | 183 virtual void OnResizeViewACK() OVERRIDE; |
| 182 virtual void OnResize(gfx::Size size) OVERRIDE; | 184 virtual void OnResize(gfx::Size size) OVERRIDE; |
| 183 virtual gfx::Size GetSize() OVERRIDE; | 185 virtual gfx::Size GetSize() OVERRIDE; |
| 184 | 186 |
| 185 protected: | 187 protected: |
| 186 virtual ~PassThroughImageTransportSurface(); | 188 virtual ~PassThroughImageTransportSurface(); |
| 187 | 189 |
| 190 // If updated vsync parameters can be determined, send this information to |
| 191 // the browser. |
| 192 virtual void SendVSyncUpdateIfAvailable(); |
| 193 |
| 188 private: | 194 private: |
| 189 scoped_ptr<ImageTransportHelper> helper_; | 195 scoped_ptr<ImageTransportHelper> helper_; |
| 190 gfx::Size new_size_; | 196 gfx::Size new_size_; |
| 191 bool transport_; | 197 bool transport_; |
| 192 bool did_set_swap_interval_; | 198 bool did_set_swap_interval_; |
| 193 | 199 |
| 194 DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface); | 200 DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface); |
| 195 }; | 201 }; |
| 196 | 202 |
| 197 } // namespace content | 203 } // namespace content |
| 198 | 204 |
| 199 #endif // defined(ENABLE_GPU) | 205 #endif // defined(ENABLE_GPU) |
| 200 | 206 |
| 201 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ | 207 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ |
| OLD | NEW |