| 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 <vector> | 10 #include <vector> |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 // Initializes the graphics context. Can create an offscreen | 96 // Initializes the graphics context. Can create an offscreen |
| 97 // decoder with a frame buffer that can be referenced from the parent. | 97 // decoder with a frame buffer that can be referenced from the parent. |
| 98 // Takes ownership of GLContext. | 98 // Takes ownership of GLContext. |
| 99 // Parameters: | 99 // Parameters: |
| 100 // surface: the GL surface to render to. | 100 // surface: the GL surface to render to. |
| 101 // context: the GL context to render to. | 101 // context: the GL context to render to. |
| 102 // offscreen: whether to make the context offscreen or not. When FBO 0 is | 102 // offscreen: whether to make the context offscreen or not. When FBO 0 is |
| 103 // bound, offscreen contexts render to an internal buffer, onscreen ones | 103 // bound, offscreen contexts render to an internal buffer, onscreen ones |
| 104 // to the surface. | 104 // to the surface. |
| 105 // size: the size if the GL context is offscreen. | 105 // size: the size if the GL context is offscreen. |
| 106 // allowed_extensions: A string in the same format as | |
| 107 // glGetString(GL_EXTENSIONS) that lists the extensions this context | |
| 108 // should allow. Passing NULL or "*" means allow all extensions. | |
| 109 // Returns: | 106 // Returns: |
| 110 // true if successful. | 107 // true if successful. |
| 111 virtual bool Initialize(const scoped_refptr<gfx::GLSurface>& surface, | 108 virtual bool Initialize(const scoped_refptr<gfx::GLSurface>& surface, |
| 112 const scoped_refptr<gfx::GLContext>& context, | 109 const scoped_refptr<gfx::GLContext>& context, |
| 113 bool offscreen, | 110 bool offscreen, |
| 114 const gfx::Size& size, | 111 const gfx::Size& size, |
| 115 const DisallowedFeatures& disallowed_features, | 112 const DisallowedFeatures& disallowed_features, |
| 116 const char* allowed_extensions, | |
| 117 const std::vector<int32>& attribs) = 0; | 113 const std::vector<int32>& attribs) = 0; |
| 118 | 114 |
| 119 // Destroys the graphics context. | 115 // Destroys the graphics context. |
| 120 virtual void Destroy(bool have_context) = 0; | 116 virtual void Destroy(bool have_context) = 0; |
| 121 | 117 |
| 122 // Set the surface associated with the default FBO. | 118 // Set the surface associated with the default FBO. |
| 123 virtual void SetSurface(const scoped_refptr<gfx::GLSurface>& surface) = 0; | 119 virtual void SetSurface(const scoped_refptr<gfx::GLSurface>& surface) = 0; |
| 124 | 120 |
| 125 virtual bool ProduceFrontBuffer(const Mailbox& mailbox) = 0; | 121 virtual bool ProduceFrontBuffer(const Mailbox& mailbox) = 0; |
| 126 | 122 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 bool debug_; | 240 bool debug_; |
| 245 bool log_commands_; | 241 bool log_commands_; |
| 246 static bool testing_force_is_angle_; | 242 static bool testing_force_is_angle_; |
| 247 | 243 |
| 248 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); | 244 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); |
| 249 }; | 245 }; |
| 250 | 246 |
| 251 } // namespace gles2 | 247 } // namespace gles2 |
| 252 } // namespace gpu | 248 } // namespace gpu |
| 253 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 249 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
| OLD | NEW |