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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 bool HasClient() { return !!client_; } | 144 bool HasClient() { return !!client_; } |
145 | 145 |
146 // Get the class capable of informing cc of hardware overlay capability. | 146 // Get the class capable of informing cc of hardware overlay capability. |
147 OverlayCandidateValidator* overlay_candidate_validator() const { | 147 OverlayCandidateValidator* overlay_candidate_validator() const { |
148 return overlay_candidate_validator_.get(); | 148 return overlay_candidate_validator_.get(); |
149 } | 149 } |
150 | 150 |
151 void DidLoseOutputSurface(); | 151 void DidLoseOutputSurface(); |
152 void SetMemoryPolicy(const ManagedMemoryPolicy& policy); | 152 void SetMemoryPolicy(const ManagedMemoryPolicy& policy); |
153 | 153 |
| 154 // Support for a pull-model where draws are requested by the output surface. |
| 155 // |
| 156 // OutputSurface::Invalidate is called by the compositor to notify that |
| 157 // there's new content. |
| 158 virtual void Invalidate() {} |
| 159 |
154 protected: | 160 protected: |
155 OutputSurfaceClient* client_; | 161 OutputSurfaceClient* client_; |
156 | 162 |
157 // Synchronously initialize context3d and enter hardware mode. | 163 // Synchronously initialize context3d and enter hardware mode. |
158 // This can only supported in threaded compositing mode. | 164 // This can only supported in threaded compositing mode. |
159 bool InitializeAndSetContext3d( | 165 bool InitializeAndSetContext3d( |
160 scoped_refptr<ContextProvider> context_provider); | 166 scoped_refptr<ContextProvider> context_provider); |
161 void ReleaseGL(); | 167 void ReleaseGL(); |
162 | 168 |
163 void PostSwapBuffersComplete(); | 169 void PostSwapBuffersComplete(); |
(...skipping 27 matching lines...) Expand all Loading... |
191 bool external_stencil_test_enabled_; | 197 bool external_stencil_test_enabled_; |
192 | 198 |
193 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; | 199 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; |
194 | 200 |
195 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 201 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
196 }; | 202 }; |
197 | 203 |
198 } // namespace cc | 204 } // namespace cc |
199 | 205 |
200 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 206 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
OLD | NEW |