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/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 | 89 |
90 virtual void BindFramebuffer(); | 90 virtual void BindFramebuffer(); |
91 | 91 |
92 virtual void PostSubBuffer(gfx::Rect rect, const LatencyInfo&); | 92 virtual void PostSubBuffer(gfx::Rect rect, const LatencyInfo&); |
93 virtual void SwapBuffers(const LatencyInfo&); | 93 virtual void SwapBuffers(const LatencyInfo&); |
94 | 94 |
95 // Notifies frame-rate smoothness preference. If true, all non-critical | 95 // Notifies frame-rate smoothness preference. If true, all non-critical |
96 // processing should be stopped, or lowered in priority. | 96 // processing should be stopped, or lowered in priority. |
97 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) {} | 97 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) {} |
98 | 98 |
99 // Requests a vsync notification from the output surface. The notification | 99 // Requests a BeginFrame notification from the output surface. The |
100 // will be delivered by calling OutputSurfaceClient::DidVSync for all future | 100 // notification will be delivered by calling OutputSurfaceClient::BeginFrame |
101 // vsync events until the callback is disabled. | 101 // until the callback is disabled. |
102 virtual void EnableVSyncNotification(bool enable_vsync) {} | 102 virtual void EnableBeginFrameNotification(bool enable) {} |
Sami
2013/05/15 12:11:20
Should we rename this to SetNeedsBeginFrame (here
brianderson
2013/05/15 18:03:30
Consistency is good, so I will change this to SetN
| |
103 | 103 |
104 protected: | 104 protected: |
105 OutputSurfaceClient* client_; | 105 OutputSurfaceClient* client_; |
106 struct cc::OutputSurface::Capabilities capabilities_; | 106 struct cc::OutputSurface::Capabilities capabilities_; |
107 scoped_ptr<WebKit::WebGraphicsContext3D> context3d_; | 107 scoped_ptr<WebKit::WebGraphicsContext3D> context3d_; |
108 scoped_ptr<cc::SoftwareOutputDevice> software_device_; | 108 scoped_ptr<cc::SoftwareOutputDevice> software_device_; |
109 bool has_gl_discard_backbuffer_; | 109 bool has_gl_discard_backbuffer_; |
110 | 110 |
111 scoped_ptr<OutputSurfaceCallbacks> callbacks_; | 111 scoped_ptr<OutputSurfaceCallbacks> callbacks_; |
112 | 112 |
113 private: | 113 private: |
114 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 114 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
115 }; | 115 }; |
116 | 116 |
117 } // namespace cc | 117 } // namespace cc |
118 | 118 |
119 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 119 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
OLD | NEW |