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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 // Notifies frame-rate smoothness preference. If true, all non-critical | 98 // Notifies frame-rate smoothness preference. If true, all non-critical |
99 // processing should be stopped, or lowered in priority. | 99 // processing should be stopped, or lowered in priority. |
100 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) {} | 100 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) {} |
101 | 101 |
102 // Requests a BeginFrame notification from the output surface. The | 102 // Requests a BeginFrame notification from the output surface. The |
103 // notification will be delivered by calling | 103 // notification will be delivered by calling |
104 // OutputSurfaceClient::BeginFrame until the callback is disabled. | 104 // OutputSurfaceClient::BeginFrame until the callback is disabled. |
105 virtual void SetNeedsBeginFrame(bool enable) {} | 105 virtual void SetNeedsBeginFrame(bool enable) {} |
106 | 106 |
107 protected: | 107 protected: |
| 108 bool InitializeAndSetContext3D( |
| 109 scoped_ptr<WebKit::WebGraphicsContext3D> context3d); |
| 110 |
108 OutputSurfaceClient* client_; | 111 OutputSurfaceClient* client_; |
109 struct cc::OutputSurface::Capabilities capabilities_; | 112 struct cc::OutputSurface::Capabilities capabilities_; |
| 113 scoped_ptr<OutputSurfaceCallbacks> callbacks_; |
110 scoped_ptr<WebKit::WebGraphicsContext3D> context3d_; | 114 scoped_ptr<WebKit::WebGraphicsContext3D> context3d_; |
111 scoped_ptr<cc::SoftwareOutputDevice> software_device_; | 115 scoped_ptr<cc::SoftwareOutputDevice> software_device_; |
112 bool has_gl_discard_backbuffer_; | 116 bool has_gl_discard_backbuffer_; |
113 | 117 |
114 scoped_ptr<OutputSurfaceCallbacks> callbacks_; | |
115 | |
116 private: | 118 private: |
117 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 119 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
118 }; | 120 }; |
119 | 121 |
120 } // namespace cc | 122 } // namespace cc |
121 | 123 |
122 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 124 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
OLD | NEW |