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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 // true if successful. | 98 // true if successful. |
99 virtual bool Initialize(const scoped_refptr<gfx::GLSurface>& surface, | 99 virtual bool Initialize(const scoped_refptr<gfx::GLSurface>& surface, |
100 const scoped_refptr<gfx::GLContext>& context, | 100 const scoped_refptr<gfx::GLContext>& context, |
101 bool offscreen, | 101 bool offscreen, |
102 const gfx::Size& size, | 102 const gfx::Size& size, |
103 const DisallowedFeatures& disallowed_features, | 103 const DisallowedFeatures& disallowed_features, |
104 const char* allowed_extensions, | 104 const char* allowed_extensions, |
105 const std::vector<int32>& attribs) = 0; | 105 const std::vector<int32>& attribs) = 0; |
106 | 106 |
107 // Destroys the graphics context. | 107 // Destroys the graphics context. |
108 virtual void Destroy() = 0; | 108 virtual void Destroy(bool have_context) = 0; |
| 109 |
| 110 // Set the surface associated with the default FBO. |
| 111 virtual void SetSurface(const scoped_refptr<gfx::GLSurface>& surface) = 0; |
109 | 112 |
110 virtual bool SetParent(GLES2Decoder* parent_decoder, | 113 virtual bool SetParent(GLES2Decoder* parent_decoder, |
111 uint32 parent_texture_id) = 0; | 114 uint32 parent_texture_id) = 0; |
112 | 115 |
113 // Resize an offscreen frame buffer. | 116 // Resize an offscreen frame buffer. |
114 virtual bool ResizeOffscreenFrameBuffer(const gfx::Size& size) = 0; | 117 virtual bool ResizeOffscreenFrameBuffer(const gfx::Size& size) = 0; |
115 | 118 |
116 // Make this decoder's GL context current. | 119 // Make this decoder's GL context current. |
117 virtual bool MakeCurrent() = 0; | 120 virtual bool MakeCurrent() = 0; |
118 | 121 |
119 // Have the decoder release the context. | 122 // Have the decoder release the context. |
120 virtual void ReleaseCurrent() = 0; | 123 virtual void ReleaseCurrent() = 0; |
121 | 124 |
122 // Gets the GLES2 Util which holds info. | 125 // Gets the GLES2 Util which holds info. |
123 virtual GLES2Util* GetGLES2Util() = 0; | 126 virtual GLES2Util* GetGLES2Util() = 0; |
124 | 127 |
125 // Gets the associated GLSurface. | |
126 virtual gfx::GLSurface* GetGLSurface() = 0; | |
127 | |
128 // Gets the associated GLContext. | 128 // Gets the associated GLContext. |
129 virtual gfx::GLContext* GetGLContext() = 0; | 129 virtual gfx::GLContext* GetGLContext() = 0; |
130 | 130 |
131 // Gets the associated ContextGroup | 131 // Gets the associated ContextGroup |
132 virtual ContextGroup* GetContextGroup() = 0; | 132 virtual ContextGroup* GetContextGroup() = 0; |
133 | 133 |
134 // Gets the QueryManager for this context. | 134 // Gets the QueryManager for this context. |
135 virtual QueryManager* GetQueryManager() = 0; | 135 virtual QueryManager* GetQueryManager() = 0; |
136 | 136 |
137 // Process any pending queries. Returns false if there are no pending queries. | 137 // Process any pending queries. Returns false if there are no pending queries. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 bool log_synthesized_gl_errors_; | 182 bool log_synthesized_gl_errors_; |
183 static bool testing_force_is_angle_; | 183 static bool testing_force_is_angle_; |
184 | 184 |
185 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); | 185 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); |
186 }; | 186 }; |
187 | 187 |
188 } // namespace gles2 | 188 } // namespace gles2 |
189 } // namespace gpu | 189 } // namespace gpu |
190 | 190 |
191 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 191 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
OLD | NEW |