| 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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 bool HasClient() { return !!client_; } | 163 bool HasClient() { return !!client_; } |
| 164 void SetNeedsRedrawRect(gfx::Rect damage_rect); | 164 void SetNeedsRedrawRect(gfx::Rect damage_rect); |
| 165 void BeginFrame(const BeginFrameArgs& args); | 165 void BeginFrame(const BeginFrameArgs& args); |
| 166 void DidSwapBuffers(); | 166 void DidSwapBuffers(); |
| 167 void OnSwapBuffersComplete(const CompositorFrameAck* ack); | 167 void OnSwapBuffersComplete(const CompositorFrameAck* ack); |
| 168 void DidLoseOutputSurface(); | 168 void DidLoseOutputSurface(); |
| 169 void SetExternalDrawConstraints(const gfx::Transform& transform, | 169 void SetExternalDrawConstraints(const gfx::Transform& transform, |
| 170 gfx::Rect viewport); | 170 gfx::Rect viewport); |
| 171 | 171 |
| 172 // virtual for testing. | 172 // virtual for testing. |
| 173 virtual base::TimeDelta RetroactiveBeginFramePeriod(); | 173 virtual base::TimeTicks RetroactiveBeginFrameDeadline(); |
| 174 virtual void PostCheckForRetroactiveBeginFrame(); | 174 virtual void PostCheckForRetroactiveBeginFrame(); |
| 175 void CheckForRetroactiveBeginFrame(); | 175 void CheckForRetroactiveBeginFrame(); |
| 176 | 176 |
| 177 private: | 177 private: |
| 178 OutputSurfaceClient* client_; | 178 OutputSurfaceClient* client_; |
| 179 friend class OutputSurfaceCallbacks; | 179 friend class OutputSurfaceCallbacks; |
| 180 | 180 |
| 181 void SetContext3D(scoped_ptr<WebKit::WebGraphicsContext3D> context3d); | 181 void SetContext3D(scoped_ptr<WebKit::WebGraphicsContext3D> context3d); |
| 182 void SetMemoryPolicy(const ManagedMemoryPolicy& policy, | 182 void SetMemoryPolicy(const ManagedMemoryPolicy& policy, |
| 183 bool discard_backbuffer_when_not_visible); | 183 bool discard_backbuffer_when_not_visible); |
| 184 | 184 |
| 185 // This stores a BeginFrame that we couldn't process immediately, but might | 185 // This stores a BeginFrame that we couldn't process immediately, but might |
| 186 // process retroactively in the near future. | 186 // process retroactively in the near future. |
| 187 BeginFrameArgs skipped_begin_frame_args_; | 187 BeginFrameArgs skipped_begin_frame_args_; |
| 188 | 188 |
| 189 // check_for_retroactive_begin_frame_pending_ is used to avoid posting | 189 // check_for_retroactive_begin_frame_pending_ is used to avoid posting |
| 190 // redundant checks for a retroactive BeginFrame. | 190 // redundant checks for a retroactive BeginFrame. |
| 191 bool check_for_retroactive_begin_frame_pending_; | 191 bool check_for_retroactive_begin_frame_pending_; |
| 192 | 192 |
| 193 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 193 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
| 194 }; | 194 }; |
| 195 | 195 |
| 196 } // namespace cc | 196 } // namespace cc |
| 197 | 197 |
| 198 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 198 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
| OLD | NEW |