| 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 scoped_refptr<ContextProvider> worker_context_provider); | 167 scoped_refptr<ContextProvider> worker_context_provider); |
| 162 void ReleaseGL(); | 168 void ReleaseGL(); |
| 163 | 169 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 192 bool external_stencil_test_enabled_; | 198 bool external_stencil_test_enabled_; |
| 193 | 199 |
| 194 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; | 200 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; |
| 195 | 201 |
| 196 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 202 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
| 197 }; | 203 }; |
| 198 | 204 |
| 199 } // namespace cc | 205 } // namespace cc |
| 200 | 206 |
| 201 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 207 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
| OLD | NEW |