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 #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ | 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
6 #define GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ | 6 #define GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
7 | 7 |
8 #include <GLES2/gl2.h> | 8 #include <GLES2/gl2.h> |
9 | 9 |
10 #include <list> | 10 #include <list> |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 GLint GetUniformLocationHelper(GLuint program, const char* name); | 215 GLint GetUniformLocationHelper(GLuint program, const char* name); |
216 GLint GetFragDataLocationHelper(GLuint program, const char* name); | 216 GLint GetFragDataLocationHelper(GLuint program, const char* name); |
217 bool GetActiveAttribHelper( | 217 bool GetActiveAttribHelper( |
218 GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, | 218 GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, |
219 GLint* size, GLenum* type, char* name); | 219 GLint* size, GLenum* type, char* name); |
220 bool GetActiveUniformHelper( | 220 bool GetActiveUniformHelper( |
221 GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, | 221 GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, |
222 GLint* size, GLenum* type, char* name); | 222 GLint* size, GLenum* type, char* name); |
223 void GetUniformBlocksCHROMIUMHelper( | 223 void GetUniformBlocksCHROMIUMHelper( |
224 GLuint program, std::vector<int8>* result); | 224 GLuint program, std::vector<int8>* result); |
| 225 void GetUniformsES3CHROMIUMHelper( |
| 226 GLuint program, std::vector<int8>* result); |
225 GLuint GetUniformBlockIndexHelper(GLuint program, const char* name); | 227 GLuint GetUniformBlockIndexHelper(GLuint program, const char* name); |
226 bool GetActiveUniformBlockNameHelper( | 228 bool GetActiveUniformBlockNameHelper( |
227 GLuint program, GLuint index, GLsizei bufsize, | 229 GLuint program, GLuint index, GLsizei bufsize, |
228 GLsizei* length, char* name); | 230 GLsizei* length, char* name); |
| 231 bool GetActiveUniformBlockivHelper( |
| 232 GLuint program, GLuint index, GLenum pname, GLint* params); |
| 233 void GetTransformFeedbackVaryingsCHROMIUMHelper( |
| 234 GLuint program, std::vector<int8>* result); |
| 235 bool GetTransformFeedbackVaryingHelper( |
| 236 GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, |
| 237 GLint* size, GLenum* type, char* name); |
| 238 bool GetUniformIndicesHelper( |
| 239 GLuint program, GLsizei count, const char* const* names, GLuint* indices); |
| 240 bool GetActiveUniformsivHelper( |
| 241 GLuint program, GLsizei count, const GLuint* indices, |
| 242 GLenum pname, GLint* params); |
229 | 243 |
230 void FreeUnusedSharedMemory(); | 244 void FreeUnusedSharedMemory(); |
231 void FreeEverything(); | 245 void FreeEverything(); |
232 | 246 |
233 // ContextSupport implementation. | 247 // ContextSupport implementation. |
234 void SignalSyncPoint(uint32 sync_point, | 248 void SignalSyncPoint(uint32 sync_point, |
235 const base::Closure& callback) override; | 249 const base::Closure& callback) override; |
236 void SignalQuery(uint32 query, const base::Closure& callback) override; | 250 void SignalQuery(uint32 query, const base::Closure& callback) override; |
237 void SetSurfaceVisible(bool visible) override; | 251 void SetSurfaceVisible(bool visible) override; |
238 | 252 |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 // Free every async upload buffer. If some async upload buffer is still in use | 632 // Free every async upload buffer. If some async upload buffer is still in use |
619 // wait for them to finish before freeing. | 633 // wait for them to finish before freeing. |
620 void FreeAllAsyncUploadBuffers(); | 634 void FreeAllAsyncUploadBuffers(); |
621 | 635 |
622 bool GetBoundPixelTransferBuffer( | 636 bool GetBoundPixelTransferBuffer( |
623 GLenum target, const char* function_name, GLuint* buffer_id); | 637 GLenum target, const char* function_name, GLuint* buffer_id); |
624 BufferTracker::Buffer* GetBoundPixelUnpackTransferBufferIfValid( | 638 BufferTracker::Buffer* GetBoundPixelUnpackTransferBufferIfValid( |
625 GLuint buffer_id, | 639 GLuint buffer_id, |
626 const char* function_name, GLuint offset, GLsizei size); | 640 const char* function_name, GLuint offset, GLsizei size); |
627 | 641 |
| 642 // Pack 2D arrays of char into a bucket. |
| 643 // Helper function for ShaderSource(), TransformFeedbackVaryings(), etc. |
| 644 bool PackStringsToBucket(GLsizei count, |
| 645 const char* const* str, |
| 646 const GLint* length, |
| 647 const char* func_name); |
| 648 |
628 const std::string& GetLogPrefix() const; | 649 const std::string& GetLogPrefix() const; |
629 | 650 |
630 #if defined(GL_CLIENT_FAIL_GL_ERRORS) | 651 #if defined(GL_CLIENT_FAIL_GL_ERRORS) |
631 void CheckGLError(); | 652 void CheckGLError(); |
632 void FailGLError(GLenum error); | 653 void FailGLError(GLenum error); |
633 #else | 654 #else |
634 void CheckGLError() { } | 655 void CheckGLError() { } |
635 void FailGLError(GLenum /* error */) { } | 656 void FailGLError(GLenum /* error */) { } |
636 #endif | 657 #endif |
637 | 658 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 | 822 |
802 inline bool GLES2Implementation::GetTexParameterivHelper( | 823 inline bool GLES2Implementation::GetTexParameterivHelper( |
803 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { | 824 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { |
804 return false; | 825 return false; |
805 } | 826 } |
806 | 827 |
807 } // namespace gles2 | 828 } // namespace gles2 |
808 } // namespace gpu | 829 } // namespace gpu |
809 | 830 |
810 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ | 831 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
OLD | NEW |