| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 bool HasClient() { return !!client_; } | 128 bool HasClient() { return !!client_; } |
| 129 | 129 |
| 130 // Get the class capable of informing cc of hardware overlay capability. | 130 // Get the class capable of informing cc of hardware overlay capability. |
| 131 OverlayCandidateValidator* overlay_candidate_validator() const { | 131 OverlayCandidateValidator* overlay_candidate_validator() const { |
| 132 return overlay_candidate_validator_.get(); | 132 return overlay_candidate_validator_.get(); |
| 133 } | 133 } |
| 134 | 134 |
| 135 void DidLoseOutputSurface(); | 135 void DidLoseOutputSurface(); |
| 136 void SetMemoryPolicy(const ManagedMemoryPolicy& policy); | 136 void SetMemoryPolicy(const ManagedMemoryPolicy& policy); |
| 137 | 137 |
| 138 // Support for a pull-model where draws are requested by the output surface. |
| 139 // |
| 140 // OutputSurface::Invalidate is called by the compositor to notify that |
| 141 // there's new content. |
| 142 // |
| 143 // OutputSurfaceClient::RequestDraw is called by the output surface later to |
| 144 // notify that the output surface is ready for a draw. |
| 145 virtual void Invalidate() {} |
| 146 |
| 138 protected: | 147 protected: |
| 139 OutputSurfaceClient* client_; | 148 OutputSurfaceClient* client_; |
| 140 | 149 |
| 141 // Synchronously initialize context3d and enter hardware mode. | 150 // Synchronously initialize context3d and enter hardware mode. |
| 142 // This can only supported in threaded compositing mode. | 151 // This can only supported in threaded compositing mode. |
| 143 bool InitializeAndSetContext3d( | 152 bool InitializeAndSetContext3d( |
| 144 scoped_refptr<ContextProvider> context_provider); | 153 scoped_refptr<ContextProvider> context_provider); |
| 145 void ReleaseGL(); | 154 void ReleaseGL(); |
| 146 | 155 |
| 147 void PostSwapBuffersComplete(); | 156 void PostSwapBuffersComplete(); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 174 bool external_stencil_test_enabled_; | 183 bool external_stencil_test_enabled_; |
| 175 | 184 |
| 176 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; | 185 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; |
| 177 | 186 |
| 178 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 187 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
| 179 }; | 188 }; |
| 180 | 189 |
| 181 } // namespace cc | 190 } // namespace cc |
| 182 | 191 |
| 183 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 192 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
| OLD | NEW |