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