| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 const gfx::Size& offscreen_size, | 153 const gfx::Size& offscreen_size, |
| 153 const DisallowedFeatures& disallowed_features, | 154 const DisallowedFeatures& disallowed_features, |
| 154 const std::vector<int32_t>& attribs) = 0; | 155 const std::vector<int32_t>& attribs) = 0; |
| 155 | 156 |
| 156 // Destroys the graphics context. | 157 // Destroys the graphics context. |
| 157 virtual void Destroy(bool have_context) = 0; | 158 virtual void Destroy(bool have_context) = 0; |
| 158 | 159 |
| 159 // Set the surface associated with the default FBO. | 160 // Set the surface associated with the default FBO. |
| 160 virtual void SetSurface(const scoped_refptr<gfx::GLSurface>& surface) = 0; | 161 virtual void SetSurface(const scoped_refptr<gfx::GLSurface>& surface) = 0; |
| 161 | 162 |
| 163 // Releases the surface associated with the GL context. |
| 164 // The decoder should not be used until a new surface is set. |
| 165 virtual void ReleaseSurface() = 0; |
| 166 |
| 162 virtual void ProduceFrontBuffer(const Mailbox& mailbox) = 0; | 167 virtual void ProduceFrontBuffer(const Mailbox& mailbox) = 0; |
| 168 virtual void TakeFrontBuffer(const Mailbox& mailbox) = 0; |
| 169 virtual void ReturnFrontBuffer(const Mailbox& mailbox, |
| 170 bool is_lost) = 0; |
| 163 | 171 |
| 164 // Resize an offscreen frame buffer. | 172 // Resize an offscreen frame buffer. |
| 165 virtual bool ResizeOffscreenFrameBuffer(const gfx::Size& size) = 0; | 173 virtual bool ResizeOffscreenFrameBuffer(const gfx::Size& size) = 0; |
| 166 | 174 |
| 167 // Make this decoder's GL context current. | 175 // Make this decoder's GL context current. |
| 168 virtual bool MakeCurrent() = 0; | 176 virtual bool MakeCurrent() = 0; |
| 169 | 177 |
| 170 // Gets the GLES2 Util which holds info. | 178 // Gets the GLES2 Util which holds info. |
| 171 virtual GLES2Util* GetGLES2Util() = 0; | 179 virtual GLES2Util* GetGLES2Util() = 0; |
| 172 | 180 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 194 virtual void RestoreTextureState(unsigned service_id) const = 0; | 202 virtual void RestoreTextureState(unsigned service_id) const = 0; |
| 195 virtual void RestoreTextureUnitBindings(unsigned unit) const = 0; | 203 virtual void RestoreTextureUnitBindings(unsigned unit) const = 0; |
| 196 virtual void RestoreAllExternalTextureBindingsIfNeeded() = 0; | 204 virtual void RestoreAllExternalTextureBindingsIfNeeded() = 0; |
| 197 | 205 |
| 198 virtual void ClearAllAttributes() const = 0; | 206 virtual void ClearAllAttributes() const = 0; |
| 199 virtual void RestoreAllAttributes() const = 0; | 207 virtual void RestoreAllAttributes() const = 0; |
| 200 | 208 |
| 201 virtual void SetIgnoreCachedStateForTest(bool ignore) = 0; | 209 virtual void SetIgnoreCachedStateForTest(bool ignore) = 0; |
| 202 virtual void SetForceShaderNameHashingForTest(bool force) = 0; | 210 virtual void SetForceShaderNameHashingForTest(bool force) = 0; |
| 203 virtual uint32_t GetAndClearBackbufferClearBitsForTest(); | 211 virtual uint32_t GetAndClearBackbufferClearBitsForTest(); |
| 212 virtual size_t GetSavedBackTextureCountForTest() = 0; |
| 213 virtual size_t GetCreatedBackTextureCountForTest() = 0; |
| 204 | 214 |
| 205 // Gets the QueryManager for this context. | 215 // Gets the QueryManager for this context. |
| 206 virtual QueryManager* GetQueryManager() = 0; | 216 virtual QueryManager* GetQueryManager() = 0; |
| 207 | 217 |
| 208 // Gets the VertexArrayManager for this context. | 218 // Gets the VertexArrayManager for this context. |
| 209 virtual VertexArrayManager* GetVertexArrayManager() = 0; | 219 virtual VertexArrayManager* GetVertexArrayManager() = 0; |
| 210 | 220 |
| 211 // Gets the ImageManager for this context. | 221 // Gets the ImageManager for this context. |
| 212 virtual ImageManager* GetImageManager() = 0; | 222 virtual ImageManager* GetImageManager() = 0; |
| 213 | 223 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 bool log_commands_; | 311 bool log_commands_; |
| 302 bool unsafe_es3_apis_enabled_; | 312 bool unsafe_es3_apis_enabled_; |
| 303 bool force_shader_name_hashing_for_test_; | 313 bool force_shader_name_hashing_for_test_; |
| 304 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); | 314 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); |
| 305 }; | 315 }; |
| 306 | 316 |
| 307 } // namespace gles2 | 317 } // namespace gles2 |
| 308 } // namespace gpu | 318 } // namespace gpu |
| 309 | 319 |
| 310 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 320 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
| OLD | NEW |