OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 11 matching lines...) Expand all Loading... |
22 | 22 |
23 namespace gpu { | 23 namespace gpu { |
24 | 24 |
25 class SurfaceManager; | 25 class SurfaceManager; |
26 | 26 |
27 namespace gles2 { | 27 namespace gles2 { |
28 | 28 |
29 class ContextGroup; | 29 class ContextGroup; |
30 class GLES2Util; | 30 class GLES2Util; |
31 | 31 |
32 struct DisallowedExtensions { | 32 struct DisallowedFeatures { |
33 DisallowedExtensions() | 33 DisallowedFeatures() |
34 : multisampling(false), | 34 : multisampling(false), |
35 driver_bug_workarounds(false) { | 35 driver_bug_workarounds(false) { |
36 } | 36 } |
37 | 37 |
38 bool multisampling; | 38 bool multisampling; |
39 bool driver_bug_workarounds; | 39 bool driver_bug_workarounds; |
40 }; | 40 }; |
41 | 41 |
42 // This class implements the AsyncAPIInterface interface, decoding GLES2 | 42 // This class implements the AsyncAPIInterface interface, decoding GLES2 |
43 // commands and calling GL. | 43 // commands and calling GL. |
(...skipping 22 matching lines...) Expand all Loading... |
66 // context: the GL context to render to. | 66 // context: the GL context to render to. |
67 // size: the size if the GL context is offscreen. | 67 // size: the size if the GL context is offscreen. |
68 // allowed_extensions: A string in the same format as | 68 // allowed_extensions: A string in the same format as |
69 // glGetString(GL_EXTENSIONS) that lists the extensions this context | 69 // glGetString(GL_EXTENSIONS) that lists the extensions this context |
70 // should allow. Passing NULL or "*" means allow all extensions. | 70 // should allow. Passing NULL or "*" means allow all extensions. |
71 // Returns: | 71 // Returns: |
72 // true if successful. | 72 // true if successful. |
73 virtual bool Initialize(const scoped_refptr<gfx::GLSurface>& surface, | 73 virtual bool Initialize(const scoped_refptr<gfx::GLSurface>& surface, |
74 const scoped_refptr<gfx::GLContext>& context, | 74 const scoped_refptr<gfx::GLContext>& context, |
75 const gfx::Size& size, | 75 const gfx::Size& size, |
76 const DisallowedExtensions& disallowed_extensions, | 76 const DisallowedFeatures& disallowed_features, |
77 const char* allowed_extensions, | 77 const char* allowed_extensions, |
78 const std::vector<int32>& attribs) = 0; | 78 const std::vector<int32>& attribs) = 0; |
79 | 79 |
80 // Destroys the graphics context. | 80 // Destroys the graphics context. |
81 virtual void Destroy() = 0; | 81 virtual void Destroy() = 0; |
82 | 82 |
83 virtual bool SetParent(GLES2Decoder* parent_decoder, | 83 virtual bool SetParent(GLES2Decoder* parent_decoder, |
84 uint32 parent_texture_id) = 0; | 84 uint32 parent_texture_id) = 0; |
85 | 85 |
86 // Resize an offscreen frame buffer. | 86 // Resize an offscreen frame buffer. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 private: | 125 private: |
126 bool debug_; | 126 bool debug_; |
127 | 127 |
128 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); | 128 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); |
129 }; | 129 }; |
130 | 130 |
131 } // namespace gles2 | 131 } // namespace gles2 |
132 } // namespace gpu | 132 } // namespace gpu |
133 | 133 |
134 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 134 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
OLD | NEW |