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