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 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 // Helper send functions. Caller fills in the surface specific params | 123 // Helper send functions. Caller fills in the surface specific params |
124 // like size and surface id. The helper fills in the rest. | 124 // like size and surface id. The helper fills in the rest. |
125 void SendAcceleratedSurfaceBuffersSwapped( | 125 void SendAcceleratedSurfaceBuffersSwapped( |
126 GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params); | 126 GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params); |
127 void SendUpdateVSyncParameters( | 127 void SendUpdateVSyncParameters( |
128 base::TimeTicks timebase, base::TimeDelta interval); | 128 base::TimeTicks timebase, base::TimeDelta interval); |
129 | 129 |
130 void SwapBuffersCompleted(const std::vector<ui::LatencyInfo>& latency_info); | 130 void SwapBuffersCompleted(const std::vector<ui::LatencyInfo>& latency_info); |
131 | 131 |
| 132 void PageFlipCompleted(); |
| 133 |
132 // Whether or not we should execute more commands. | 134 // Whether or not we should execute more commands. |
133 void SetScheduled(bool is_scheduled); | 135 void SetScheduled(bool is_scheduled); |
134 | 136 |
135 void DeferToFence(base::Closure task); | 137 void DeferToFence(base::Closure task); |
136 | 138 |
137 void SetPreemptByFlag( | 139 void SetPreemptByFlag( |
138 scoped_refptr<gpu::PreemptionFlag> preemption_flag); | 140 scoped_refptr<gpu::PreemptionFlag> preemption_flag); |
139 | 141 |
140 // Make the surface's context current. | 142 // Make the surface's context current. |
141 bool MakeCurrent(); | 143 bool MakeCurrent(); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 protected: | 206 protected: |
205 ~PassThroughImageTransportSurface() override; | 207 ~PassThroughImageTransportSurface() override; |
206 | 208 |
207 // If updated vsync parameters can be determined, send this information to | 209 // If updated vsync parameters can be determined, send this information to |
208 // the browser. | 210 // the browser. |
209 virtual void SendVSyncUpdateIfAvailable(); | 211 virtual void SendVSyncUpdateIfAvailable(); |
210 | 212 |
211 ImageTransportHelper* GetHelper() { return helper_.get(); } | 213 ImageTransportHelper* GetHelper() { return helper_.get(); } |
212 | 214 |
213 private: | 215 private: |
| 216 void SwapBuffersCompleted(); |
214 scoped_ptr<ImageTransportHelper> helper_; | 217 scoped_ptr<ImageTransportHelper> helper_; |
215 bool did_set_swap_interval_; | 218 bool did_set_swap_interval_; |
216 std::vector<ui::LatencyInfo> latency_info_; | 219 std::vector<ui::LatencyInfo> latency_info_; |
217 | 220 |
218 DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface); | 221 DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface); |
219 }; | 222 }; |
220 | 223 |
221 } // namespace content | 224 } // namespace content |
222 | 225 |
223 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ | 226 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ |
OLD | NEW |