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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 // context: the GL context to render to. | 147 // context: the GL context to render to. |
148 // offscreen: whether to make the context offscreen or not. When FBO 0 is | 148 // offscreen: whether to make the context offscreen or not. When FBO 0 is |
149 // bound, offscreen contexts render to an internal buffer, onscreen ones | 149 // bound, offscreen contexts render to an internal buffer, onscreen ones |
150 // to the surface. | 150 // to the surface. |
151 // offscreen_size: the size if the GL context is offscreen. | 151 // offscreen_size: the size if the GL context is offscreen. |
152 // Returns: | 152 // Returns: |
153 // true if successful. | 153 // true if successful. |
154 virtual bool Initialize(const scoped_refptr<gl::GLSurface>& surface, | 154 virtual bool Initialize(const scoped_refptr<gl::GLSurface>& surface, |
155 const scoped_refptr<gl::GLContext>& context, | 155 const scoped_refptr<gl::GLContext>& context, |
156 bool offscreen, | 156 bool offscreen, |
157 const gfx::Size& offscreen_size, | |
158 const DisallowedFeatures& disallowed_features, | 157 const DisallowedFeatures& disallowed_features, |
159 const ContextCreationAttribHelper& attrib_helper) = 0; | 158 const ContextCreationAttribHelper& attrib_helper) = 0; |
160 | 159 |
161 // Destroys the graphics context. | 160 // Destroys the graphics context. |
162 virtual void Destroy(bool have_context) = 0; | 161 virtual void Destroy(bool have_context) = 0; |
163 | 162 |
164 // Set the surface associated with the default FBO. | 163 // Set the surface associated with the default FBO. |
165 virtual void SetSurface(const scoped_refptr<gl::GLSurface>& surface) = 0; | 164 virtual void SetSurface(const scoped_refptr<gl::GLSurface>& surface) = 0; |
166 // Releases the surface associated with the GL context. | 165 // Releases the surface associated with the GL context. |
167 // The decoder should not be used until a new surface is set. | 166 // The decoder should not be used until a new surface is set. |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 bool debug_; | 344 bool debug_; |
346 bool log_commands_; | 345 bool log_commands_; |
347 bool unsafe_es3_apis_enabled_; | 346 bool unsafe_es3_apis_enabled_; |
348 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); | 347 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); |
349 }; | 348 }; |
350 | 349 |
351 } // namespace gles2 | 350 } // namespace gles2 |
352 } // namespace gpu | 351 } // namespace gpu |
353 | 352 |
354 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 353 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
OLD | NEW |