| 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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 void SetBucketAsString(uint32 bucket_id, const std::string& str); | 424 void SetBucketAsString(uint32 bucket_id, const std::string& str); |
| 425 | 425 |
| 426 // Returns true if id is reserved. | 426 // Returns true if id is reserved. |
| 427 bool IsBufferReservedId(GLuint id); | 427 bool IsBufferReservedId(GLuint id); |
| 428 bool IsFramebufferReservedId(GLuint id) { return false; } | 428 bool IsFramebufferReservedId(GLuint id) { return false; } |
| 429 bool IsRenderbufferReservedId(GLuint id) { return false; } | 429 bool IsRenderbufferReservedId(GLuint id) { return false; } |
| 430 bool IsTextureReservedId(GLuint id) { return false; } | 430 bool IsTextureReservedId(GLuint id) { return false; } |
| 431 bool IsVertexArrayReservedId(GLuint id) { return false; } | 431 bool IsVertexArrayReservedId(GLuint id) { return false; } |
| 432 bool IsProgramReservedId(GLuint id) { return false; } | 432 bool IsProgramReservedId(GLuint id) { return false; } |
| 433 bool IsValuebufferReservedId(GLuint id) { return false; } | 433 bool IsValuebufferReservedId(GLuint id) { return false; } |
| 434 bool IsSamplerReservedId(GLuint id) { return false; } |
| 434 | 435 |
| 435 void BindBufferHelper(GLenum target, GLuint buffer); | 436 void BindBufferHelper(GLenum target, GLuint buffer); |
| 436 void BindFramebufferHelper(GLenum target, GLuint framebuffer); | 437 void BindFramebufferHelper(GLenum target, GLuint framebuffer); |
| 437 void BindRenderbufferHelper(GLenum target, GLuint renderbuffer); | 438 void BindRenderbufferHelper(GLenum target, GLuint renderbuffer); |
| 438 void BindTextureHelper(GLenum target, GLuint texture); | 439 void BindTextureHelper(GLenum target, GLuint texture); |
| 439 void BindVertexArrayOESHelper(GLuint array); | 440 void BindVertexArrayOESHelper(GLuint array); |
| 440 void BindValuebufferCHROMIUMHelper(GLenum target, GLuint valuebuffer); | 441 void BindValuebufferCHROMIUMHelper(GLenum target, GLuint valuebuffer); |
| 441 void UseProgramHelper(GLuint program); | 442 void UseProgramHelper(GLuint program); |
| 442 | 443 |
| 443 void BindBufferStub(GLenum target, GLuint buffer); | 444 void BindBufferStub(GLenum target, GLuint buffer); |
| 444 void BindFramebufferStub(GLenum target, GLuint framebuffer); | 445 void BindFramebufferStub(GLenum target, GLuint framebuffer); |
| 445 void BindRenderbufferStub(GLenum target, GLuint renderbuffer); | 446 void BindRenderbufferStub(GLenum target, GLuint renderbuffer); |
| 446 void BindTextureStub(GLenum target, GLuint texture); | 447 void BindTextureStub(GLenum target, GLuint texture); |
| 447 void BindValuebufferCHROMIUMStub(GLenum target, GLuint valuebuffer); | 448 void BindValuebufferCHROMIUMStub(GLenum target, GLuint valuebuffer); |
| 448 | 449 |
| 449 void GenBuffersHelper(GLsizei n, const GLuint* buffers); | 450 void GenBuffersHelper(GLsizei n, const GLuint* buffers); |
| 450 void GenFramebuffersHelper(GLsizei n, const GLuint* framebuffers); | 451 void GenFramebuffersHelper(GLsizei n, const GLuint* framebuffers); |
| 451 void GenRenderbuffersHelper(GLsizei n, const GLuint* renderbuffers); | 452 void GenRenderbuffersHelper(GLsizei n, const GLuint* renderbuffers); |
| 452 void GenTexturesHelper(GLsizei n, const GLuint* textures); | 453 void GenTexturesHelper(GLsizei n, const GLuint* textures); |
| 453 void GenVertexArraysOESHelper(GLsizei n, const GLuint* arrays); | 454 void GenVertexArraysOESHelper(GLsizei n, const GLuint* arrays); |
| 454 void GenQueriesEXTHelper(GLsizei n, const GLuint* queries); | 455 void GenQueriesEXTHelper(GLsizei n, const GLuint* queries); |
| 455 void GenValuebuffersCHROMIUMHelper(GLsizei n, const GLuint* valuebuffers); | 456 void GenValuebuffersCHROMIUMHelper(GLsizei n, const GLuint* valuebuffers); |
| 457 void GenSamplersHelper(GLsizei n, const GLuint* samplers); |
| 456 | 458 |
| 457 void DeleteBuffersHelper(GLsizei n, const GLuint* buffers); | 459 void DeleteBuffersHelper(GLsizei n, const GLuint* buffers); |
| 458 void DeleteFramebuffersHelper(GLsizei n, const GLuint* framebuffers); | 460 void DeleteFramebuffersHelper(GLsizei n, const GLuint* framebuffers); |
| 459 void DeleteRenderbuffersHelper(GLsizei n, const GLuint* renderbuffers); | 461 void DeleteRenderbuffersHelper(GLsizei n, const GLuint* renderbuffers); |
| 460 void DeleteTexturesHelper(GLsizei n, const GLuint* textures); | 462 void DeleteTexturesHelper(GLsizei n, const GLuint* textures); |
| 461 bool DeleteProgramHelper(GLuint program); | 463 bool DeleteProgramHelper(GLuint program); |
| 462 bool DeleteShaderHelper(GLuint shader); | 464 bool DeleteShaderHelper(GLuint shader); |
| 463 void DeleteQueriesEXTHelper(GLsizei n, const GLuint* queries); | 465 void DeleteQueriesEXTHelper(GLsizei n, const GLuint* queries); |
| 464 void DeleteVertexArraysOESHelper(GLsizei n, const GLuint* arrays); | 466 void DeleteVertexArraysOESHelper(GLsizei n, const GLuint* arrays); |
| 465 void DeleteValuebuffersCHROMIUMHelper(GLsizei n, const GLuint* valuebuffers); | 467 void DeleteValuebuffersCHROMIUMHelper(GLsizei n, const GLuint* valuebuffers); |
| 468 void DeleteSamplersHelper(GLsizei n, const GLuint* samplers); |
| 466 | 469 |
| 467 void DeleteBuffersStub(GLsizei n, const GLuint* buffers); | 470 void DeleteBuffersStub(GLsizei n, const GLuint* buffers); |
| 468 void DeleteFramebuffersStub(GLsizei n, const GLuint* framebuffers); | 471 void DeleteFramebuffersStub(GLsizei n, const GLuint* framebuffers); |
| 469 void DeleteRenderbuffersStub(GLsizei n, const GLuint* renderbuffers); | 472 void DeleteRenderbuffersStub(GLsizei n, const GLuint* renderbuffers); |
| 470 void DeleteTexturesStub(GLsizei n, const GLuint* textures); | 473 void DeleteTexturesStub(GLsizei n, const GLuint* textures); |
| 471 void DeleteProgramStub(GLsizei n, const GLuint* programs); | 474 void DeleteProgramStub(GLsizei n, const GLuint* programs); |
| 472 void DeleteShaderStub(GLsizei n, const GLuint* shaders); | 475 void DeleteShaderStub(GLsizei n, const GLuint* shaders); |
| 473 void DeleteVertexArraysOESStub(GLsizei n, const GLuint* arrays); | 476 void DeleteVertexArraysOESStub(GLsizei n, const GLuint* arrays); |
| 474 void DeleteValuebuffersCHROMIUMStub(GLsizei n, const GLuint* valuebuffers); | 477 void DeleteValuebuffersCHROMIUMStub(GLsizei n, const GLuint* valuebuffers); |
| 478 void DeleteSamplersStub(GLsizei n, const GLuint* samplers); |
| 475 | 479 |
| 476 void BufferDataHelper( | 480 void BufferDataHelper( |
| 477 GLenum target, GLsizeiptr size, const void* data, GLenum usage); | 481 GLenum target, GLsizeiptr size, const void* data, GLenum usage); |
| 478 void BufferSubDataHelper( | 482 void BufferSubDataHelper( |
| 479 GLenum target, GLintptr offset, GLsizeiptr size, const void* data); | 483 GLenum target, GLintptr offset, GLsizeiptr size, const void* data); |
| 480 void BufferSubDataHelperImpl( | 484 void BufferSubDataHelperImpl( |
| 481 GLenum target, GLintptr offset, GLsizeiptr size, const void* data, | 485 GLenum target, GLintptr offset, GLsizeiptr size, const void* data, |
| 482 ScopedTransferBufferPtr* buffer); | 486 ScopedTransferBufferPtr* buffer); |
| 483 | 487 |
| 484 GLuint CreateImageCHROMIUMHelper(ClientBuffer buffer, | 488 GLuint CreateImageCHROMIUMHelper(ClientBuffer buffer, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 513 bool GetBooleanvHelper(GLenum pname, GLboolean* params); | 517 bool GetBooleanvHelper(GLenum pname, GLboolean* params); |
| 514 bool GetBufferParameterivHelper(GLenum target, GLenum pname, GLint* params); | 518 bool GetBufferParameterivHelper(GLenum target, GLenum pname, GLint* params); |
| 515 bool GetFloatvHelper(GLenum pname, GLfloat* params); | 519 bool GetFloatvHelper(GLenum pname, GLfloat* params); |
| 516 bool GetFramebufferAttachmentParameterivHelper( | 520 bool GetFramebufferAttachmentParameterivHelper( |
| 517 GLenum target, GLenum attachment, GLenum pname, GLint* params); | 521 GLenum target, GLenum attachment, GLenum pname, GLint* params); |
| 518 bool GetIntegervHelper(GLenum pname, GLint* params); | 522 bool GetIntegervHelper(GLenum pname, GLint* params); |
| 519 bool GetInternalformativHelper( | 523 bool GetInternalformativHelper( |
| 520 GLenum target, GLenum format, GLenum pname, GLsizei bufSize, | 524 GLenum target, GLenum format, GLenum pname, GLsizei bufSize, |
| 521 GLint* params); | 525 GLint* params); |
| 522 bool GetProgramivHelper(GLuint program, GLenum pname, GLint* params); | 526 bool GetProgramivHelper(GLuint program, GLenum pname, GLint* params); |
| 527 bool GetSamplerParameterfvHelper( |
| 528 GLuint sampler, GLenum pname, GLfloat* params); |
| 529 bool GetSamplerParameterivHelper( |
| 530 GLuint sampler, GLenum pname, GLint* params); |
| 523 bool GetRenderbufferParameterivHelper( | 531 bool GetRenderbufferParameterivHelper( |
| 524 GLenum target, GLenum pname, GLint* params); | 532 GLenum target, GLenum pname, GLint* params); |
| 525 bool GetShaderivHelper(GLuint shader, GLenum pname, GLint* params); | 533 bool GetShaderivHelper(GLuint shader, GLenum pname, GLint* params); |
| 526 bool GetTexParameterfvHelper(GLenum target, GLenum pname, GLfloat* params); | 534 bool GetTexParameterfvHelper(GLenum target, GLenum pname, GLfloat* params); |
| 527 bool GetTexParameterivHelper(GLenum target, GLenum pname, GLint* params); | 535 bool GetTexParameterivHelper(GLenum target, GLenum pname, GLint* params); |
| 528 const GLubyte* GetStringHelper(GLenum name); | 536 const GLubyte* GetStringHelper(GLenum name); |
| 529 | 537 |
| 530 bool IsExtensionAvailable(const char* ext); | 538 bool IsExtensionAvailable(const char* ext); |
| 531 | 539 |
| 532 // Caches certain capabilties state. Return true if cached. | 540 // Caches certain capabilties state. Return true if cached. |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 | 767 |
| 760 inline bool GLES2Implementation::GetTexParameterivHelper( | 768 inline bool GLES2Implementation::GetTexParameterivHelper( |
| 761 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { | 769 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { |
| 762 return false; | 770 return false; |
| 763 } | 771 } |
| 764 | 772 |
| 765 } // namespace gles2 | 773 } // namespace gles2 |
| 766 } // namespace gpu | 774 } // namespace gpu |
| 767 | 775 |
| 768 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ | 776 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
| OLD | NEW |