| 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 | |
| 160 protected: | 154 protected: |
| 161 OutputSurfaceClient* client_; | 155 OutputSurfaceClient* client_; |
| 162 | 156 |
| 163 // Synchronously initialize context3d and enter hardware mode. | 157 // Synchronously initialize context3d and enter hardware mode. |
| 164 // This can only supported in threaded compositing mode. | 158 // This can only supported in threaded compositing mode. |
| 165 bool InitializeAndSetContext3d( | 159 bool InitializeAndSetContext3d( |
| 166 scoped_refptr<ContextProvider> context_provider, | 160 scoped_refptr<ContextProvider> context_provider, |
| 167 scoped_refptr<ContextProvider> worker_context_provider); | 161 scoped_refptr<ContextProvider> worker_context_provider); |
| 168 void ReleaseGL(); | 162 void ReleaseGL(); |
| 169 | 163 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 198 bool external_stencil_test_enabled_; | 192 bool external_stencil_test_enabled_; |
| 199 | 193 |
| 200 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; | 194 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; |
| 201 | 195 |
| 202 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 196 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
| 203 }; | 197 }; |
| 204 | 198 |
| 205 } // namespace cc | 199 } // namespace cc |
| 206 | 200 |
| 207 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 201 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
| OLD | NEW |