OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 CC_OUTPUT_OUTPUT_SURFACE_H_ | 5 #ifndef CC_OUTPUT_OUTPUT_SURFACE_H_ |
6 #define CC_OUTPUT_OUTPUT_SURFACE_H_ | 6 #define CC_OUTPUT_OUTPUT_SURFACE_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 int pending_swap_buffers_; | 168 int pending_swap_buffers_; |
169 bool needs_begin_impl_frame_; | 169 bool needs_begin_impl_frame_; |
170 bool client_ready_for_begin_impl_frame_; | 170 bool client_ready_for_begin_impl_frame_; |
171 | 171 |
172 // This stores a BeginImplFrame that we couldn't process immediately, | 172 // This stores a BeginImplFrame that we couldn't process immediately, |
173 // but might process retroactively in the near future. | 173 // but might process retroactively in the near future. |
174 BeginFrameArgs skipped_begin_impl_frame_args_; | 174 BeginFrameArgs skipped_begin_impl_frame_args_; |
175 | 175 |
176 // Forwarded to OutputSurfaceClient but threaded through OutputSurface | 176 // Forwarded to OutputSurfaceClient but threaded through OutputSurface |
177 // first so OutputSurface has a chance to update the FrameRateController | 177 // first so OutputSurface has a chance to update the FrameRateController |
178 void SetNeedsRedrawRect(gfx::Rect damage_rect); | 178 void SetNeedsRedrawRect(const gfx::Rect& damage_rect); |
179 void BeginImplFrame(const BeginFrameArgs& args); | 179 void BeginImplFrame(const BeginFrameArgs& args); |
180 void DidSwapBuffers(); | 180 void DidSwapBuffers(); |
181 void OnSwapBuffersComplete(); | 181 void OnSwapBuffersComplete(); |
182 void ReclaimResources(const CompositorFrameAck* ack); | 182 void ReclaimResources(const CompositorFrameAck* ack); |
183 void DidLoseOutputSurface(); | 183 void DidLoseOutputSurface(); |
184 void SetExternalStencilTest(bool enabled); | 184 void SetExternalStencilTest(bool enabled); |
185 void SetExternalDrawConstraints(const gfx::Transform& transform, | 185 void SetExternalDrawConstraints(const gfx::Transform& transform, |
186 gfx::Rect viewport, | 186 const gfx::Rect& viewport, |
187 gfx::Rect clip, | 187 const gfx::Rect& clip, |
188 bool valid_for_tile_management); | 188 bool valid_for_tile_management); |
189 | 189 |
190 // virtual for testing. | 190 // virtual for testing. |
191 virtual base::TimeTicks RetroactiveBeginImplFrameDeadline(); | 191 virtual base::TimeTicks RetroactiveBeginImplFrameDeadline(); |
192 virtual void PostCheckForRetroactiveBeginImplFrame(); | 192 virtual void PostCheckForRetroactiveBeginImplFrame(); |
193 void CheckForRetroactiveBeginImplFrame(); | 193 void CheckForRetroactiveBeginImplFrame(); |
194 | 194 |
195 private: | 195 private: |
196 OutputSurfaceClient* client_; | 196 OutputSurfaceClient* client_; |
197 | 197 |
(...skipping 13 matching lines...) Expand all Loading... |
211 std::deque<unsigned> available_gpu_latency_query_ids_; | 211 std::deque<unsigned> available_gpu_latency_query_ids_; |
212 std::deque<unsigned> pending_gpu_latency_query_ids_; | 212 std::deque<unsigned> pending_gpu_latency_query_ids_; |
213 RollingTimeDeltaHistory gpu_latency_history_; | 213 RollingTimeDeltaHistory gpu_latency_history_; |
214 | 214 |
215 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 215 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
216 }; | 216 }; |
217 | 217 |
218 } // namespace cc | 218 } // namespace cc |
219 | 219 |
220 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 220 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
OLD | NEW |