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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 virtual void BindFramebuffer(); | 92 virtual void BindFramebuffer(); |
93 | 93 |
94 virtual void PostSubBuffer(gfx::Rect rect, const LatencyInfo&); | 94 virtual void PostSubBuffer(gfx::Rect rect, const LatencyInfo&); |
95 virtual void SwapBuffers(const LatencyInfo&); | 95 virtual void SwapBuffers(const LatencyInfo&); |
96 | 96 |
97 // Notifies frame-rate smoothness preference. If true, all non-critical | 97 // Notifies frame-rate smoothness preference. If true, all non-critical |
98 // processing should be stopped, or lowered in priority. | 98 // processing should be stopped, or lowered in priority. |
99 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) {} | 99 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) {} |
100 | 100 |
101 // Requests a vsync notification from the output surface. The notification | 101 // Requests a BeginFrame notification from the output surface. The |
102 // will be delivered by calling OutputSurfaceClient::DidVSync for all future | 102 // notification will be delivered by calling |
103 // vsync events until the callback is disabled. | 103 // OutputSurfaceClient::BeginFrame until the callback is disabled. |
104 virtual void EnableVSyncNotification(bool enable_vsync) {} | 104 virtual void SetNeedsBeginFrame(bool enable) {} |
105 | 105 |
106 protected: | 106 protected: |
107 OutputSurfaceClient* client_; | 107 OutputSurfaceClient* client_; |
108 struct cc::OutputSurface::Capabilities capabilities_; | 108 struct cc::OutputSurface::Capabilities capabilities_; |
109 scoped_ptr<WebKit::WebGraphicsContext3D> context3d_; | 109 scoped_ptr<WebKit::WebGraphicsContext3D> context3d_; |
110 scoped_ptr<cc::SoftwareOutputDevice> software_device_; | 110 scoped_ptr<cc::SoftwareOutputDevice> software_device_; |
111 bool has_gl_discard_backbuffer_; | 111 bool has_gl_discard_backbuffer_; |
112 | 112 |
113 scoped_ptr<OutputSurfaceCallbacks> callbacks_; | 113 scoped_ptr<OutputSurfaceCallbacks> callbacks_; |
114 | 114 |
115 private: | 115 private: |
116 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 116 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
117 }; | 117 }; |
118 | 118 |
119 } // namespace cc | 119 } // namespace cc |
120 | 120 |
121 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 121 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
OLD | NEW |