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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 // Support for a pull-model where draws are requested by the output surface. | 149 // Support for a pull-model where draws are requested by the output surface. |
150 // | 150 // |
151 // OutputSurface::Invalidate is called by the compositor to notify that | 151 // OutputSurface::Invalidate is called by the compositor to notify that |
152 // there's new content. | 152 // there's new content. |
153 virtual void Invalidate() {} | 153 virtual void Invalidate() {} |
154 | 154 |
155 // Updates the worker context provider's visibility, freeing GPU resources if | 155 // Updates the worker context provider's visibility, freeing GPU resources if |
156 // appropriate. | 156 // appropriate. |
157 virtual void SetWorkerContextShouldAggressivelyFreeResources(bool is_visible); | 157 virtual void SetWorkerContextShouldAggressivelyFreeResources(bool is_visible); |
158 | 158 |
| 159 // If this returns true, then the surface will not attempt to draw. |
| 160 virtual bool SurfaceIsSuspendForRecycle() const; |
| 161 |
159 protected: | 162 protected: |
160 OutputSurfaceClient* client_; | 163 OutputSurfaceClient* client_; |
161 | 164 |
162 void PostSwapBuffersComplete(); | 165 void PostSwapBuffersComplete(); |
163 | 166 |
164 struct OutputSurface::Capabilities capabilities_; | 167 struct OutputSurface::Capabilities capabilities_; |
165 scoped_refptr<ContextProvider> context_provider_; | 168 scoped_refptr<ContextProvider> context_provider_; |
166 scoped_refptr<ContextProvider> worker_context_provider_; | 169 scoped_refptr<ContextProvider> worker_context_provider_; |
167 scoped_ptr<SoftwareOutputDevice> software_device_; | 170 scoped_ptr<SoftwareOutputDevice> software_device_; |
168 gfx::Size surface_size_; | 171 gfx::Size surface_size_; |
(...skipping 17 matching lines...) Expand all Loading... |
186 bool external_stencil_test_enabled_; | 189 bool external_stencil_test_enabled_; |
187 | 190 |
188 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; | 191 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; |
189 | 192 |
190 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 193 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
191 }; | 194 }; |
192 | 195 |
193 } // namespace cc | 196 } // namespace cc |
194 | 197 |
195 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 198 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
OLD | NEW |