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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 // itself). For successful swaps, the implementation must call | 118 // itself). For successful swaps, the implementation must call |
119 // OutputSurfaceClient::DidSwapBuffers() and eventually | 119 // OutputSurfaceClient::DidSwapBuffers() and eventually |
120 // DidSwapBuffersComplete(). | 120 // DidSwapBuffersComplete(). |
121 virtual void SwapBuffers(CompositorFrame* frame) = 0; | 121 virtual void SwapBuffers(CompositorFrame* frame) = 0; |
122 virtual void OnSwapBuffersComplete(); | 122 virtual void OnSwapBuffersComplete(); |
123 | 123 |
124 // Notifies frame-rate smoothness preference. If true, all non-critical | 124 // Notifies frame-rate smoothness preference. If true, all non-critical |
125 // processing should be stopped, or lowered in priority. | 125 // processing should be stopped, or lowered in priority. |
126 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) {} | 126 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) {} |
127 | 127 |
128 // Requests a BeginFrame notification from the output surface. The | |
129 // notification will be delivered by calling | |
130 // OutputSurfaceClient::BeginFrame until the callback is disabled. | |
131 virtual void SetNeedsBeginFrame(bool enable) {} | |
132 | |
133 bool HasClient() { return !!client_; } | 128 bool HasClient() { return !!client_; } |
134 | 129 |
135 // Get the class capable of informing cc of hardware overlay capability. | 130 // Get the class capable of informing cc of hardware overlay capability. |
136 OverlayCandidateValidator* overlay_candidate_validator() const { | 131 OverlayCandidateValidator* overlay_candidate_validator() const { |
137 return overlay_candidate_validator_.get(); | 132 return overlay_candidate_validator_.get(); |
138 } | 133 } |
139 | 134 |
140 void DidLoseOutputSurface(); | 135 void DidLoseOutputSurface(); |
141 void SetMemoryPolicy(const ManagedMemoryPolicy& policy); | 136 void SetMemoryPolicy(const ManagedMemoryPolicy& policy); |
142 | 137 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 bool external_stencil_test_enabled_; | 174 bool external_stencil_test_enabled_; |
180 | 175 |
181 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; | 176 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; |
182 | 177 |
183 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 178 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
184 }; | 179 }; |
185 | 180 |
186 } // namespace cc | 181 } // namespace cc |
187 | 182 |
188 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 183 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
OLD | NEW |