OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // This file contains the GLES2Decoder class. | 5 // This file contains the GLES2Decoder class. |
6 | 6 |
7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
9 | 9 |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 15 matching lines...) Expand all Loading... | |
26 | 26 |
27 namespace gfx { | 27 namespace gfx { |
28 class GLContext; | 28 class GLContext; |
29 class GLSurface; | 29 class GLSurface; |
30 class Size; | 30 class Size; |
31 } | 31 } |
32 | 32 |
33 namespace gpu { | 33 namespace gpu { |
34 | 34 |
35 struct Mailbox; | 35 struct Mailbox; |
36 struct SyncToken; | |
36 | 37 |
37 namespace gles2 { | 38 namespace gles2 { |
38 | 39 |
39 class ContextGroup; | 40 class ContextGroup; |
40 class ErrorState; | 41 class ErrorState; |
41 class GLES2Util; | 42 class GLES2Util; |
42 class ImageManager; | 43 class ImageManager; |
43 class Logger; | 44 class Logger; |
44 class QueryManager; | 45 class QueryManager; |
45 class Texture; | 46 class Texture; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
151 const gfx::Size& offscreen_size, | 152 const gfx::Size& offscreen_size, |
152 const DisallowedFeatures& disallowed_features, | 153 const DisallowedFeatures& disallowed_features, |
153 const std::vector<int32_t>& attribs) = 0; | 154 const std::vector<int32_t>& attribs) = 0; |
154 | 155 |
155 // Destroys the graphics context. | 156 // Destroys the graphics context. |
156 virtual void Destroy(bool have_context) = 0; | 157 virtual void Destroy(bool have_context) = 0; |
157 | 158 |
158 // Set the surface associated with the default FBO. | 159 // Set the surface associated with the default FBO. |
159 virtual void SetSurface(const scoped_refptr<gfx::GLSurface>& surface) = 0; | 160 virtual void SetSurface(const scoped_refptr<gfx::GLSurface>& surface) = 0; |
160 | 161 |
161 virtual void ProduceFrontBuffer(const Mailbox& mailbox) = 0; | 162 // Releases the surface associated with the GL context. |
163 // The decoder should not be used until a new surface is set. | |
164 virtual void ReleaseSurface() = 0; | |
piman
2016/04/26 01:54:01
Is this a leftover from a merge conflict? (This wa
erikchen
2016/04/27 16:31:23
Whoops! Removed
| |
165 | |
166 virtual void TakeFrontBuffer(const Mailbox& mailbox) = 0; | |
167 virtual void ReturnFrontBuffer(const Mailbox& mailbox, | |
168 bool is_lost) = 0; | |
162 | 169 |
163 // Resize an offscreen frame buffer. | 170 // Resize an offscreen frame buffer. |
164 virtual bool ResizeOffscreenFrameBuffer(const gfx::Size& size) = 0; | 171 virtual bool ResizeOffscreenFrameBuffer(const gfx::Size& size) = 0; |
165 | 172 |
166 // Make this decoder's GL context current. | 173 // Make this decoder's GL context current. |
167 virtual bool MakeCurrent() = 0; | 174 virtual bool MakeCurrent() = 0; |
168 | 175 |
169 // Gets the GLES2 Util which holds info. | 176 // Gets the GLES2 Util which holds info. |
170 virtual GLES2Util* GetGLES2Util() = 0; | 177 virtual GLES2Util* GetGLES2Util() = 0; |
171 | 178 |
(...skipping 21 matching lines...) Expand all Loading... | |
193 virtual void RestoreTextureState(unsigned service_id) const = 0; | 200 virtual void RestoreTextureState(unsigned service_id) const = 0; |
194 virtual void RestoreTextureUnitBindings(unsigned unit) const = 0; | 201 virtual void RestoreTextureUnitBindings(unsigned unit) const = 0; |
195 virtual void RestoreAllExternalTextureBindingsIfNeeded() = 0; | 202 virtual void RestoreAllExternalTextureBindingsIfNeeded() = 0; |
196 | 203 |
197 virtual void ClearAllAttributes() const = 0; | 204 virtual void ClearAllAttributes() const = 0; |
198 virtual void RestoreAllAttributes() const = 0; | 205 virtual void RestoreAllAttributes() const = 0; |
199 | 206 |
200 virtual void SetIgnoreCachedStateForTest(bool ignore) = 0; | 207 virtual void SetIgnoreCachedStateForTest(bool ignore) = 0; |
201 virtual void SetForceShaderNameHashingForTest(bool force) = 0; | 208 virtual void SetForceShaderNameHashingForTest(bool force) = 0; |
202 virtual uint32_t GetAndClearBackbufferClearBitsForTest(); | 209 virtual uint32_t GetAndClearBackbufferClearBitsForTest(); |
210 virtual size_t GetSavedBackTextureCountForTest() = 0; | |
211 virtual size_t GetCreatedBackTextureCountForTest() = 0; | |
203 | 212 |
204 // Gets the QueryManager for this context. | 213 // Gets the QueryManager for this context. |
205 virtual QueryManager* GetQueryManager() = 0; | 214 virtual QueryManager* GetQueryManager() = 0; |
206 | 215 |
207 // Gets the VertexArrayManager for this context. | 216 // Gets the VertexArrayManager for this context. |
208 virtual VertexArrayManager* GetVertexArrayManager() = 0; | 217 virtual VertexArrayManager* GetVertexArrayManager() = 0; |
209 | 218 |
210 // Gets the ImageManager for this context. | 219 // Gets the ImageManager for this context. |
211 virtual ImageManager* GetImageManager() = 0; | 220 virtual ImageManager* GetImageManager() = 0; |
212 | 221 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
297 bool log_commands_; | 306 bool log_commands_; |
298 bool unsafe_es3_apis_enabled_; | 307 bool unsafe_es3_apis_enabled_; |
299 bool force_shader_name_hashing_for_test_; | 308 bool force_shader_name_hashing_for_test_; |
300 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); | 309 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); |
301 }; | 310 }; |
302 | 311 |
303 } // namespace gles2 | 312 } // namespace gles2 |
304 } // namespace gpu | 313 } // namespace gpu |
305 | 314 |
306 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 315 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
OLD | NEW |