| 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 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 | 488 |
| 489 // Gets the contents of a bucket as a string. Returns false if there is no | 489 // Gets the contents of a bucket as a string. Returns false if there is no |
| 490 // string available which is a separate case from the empty string. | 490 // string available which is a separate case from the empty string. |
| 491 bool GetBucketAsString(uint32 bucket_id, std::string* str); | 491 bool GetBucketAsString(uint32 bucket_id, std::string* str); |
| 492 | 492 |
| 493 // Sets the contents of a bucket as a string. | 493 // Sets the contents of a bucket as a string. |
| 494 void SetBucketAsString(uint32 bucket_id, const std::string& str); | 494 void SetBucketAsString(uint32 bucket_id, const std::string& str); |
| 495 | 495 |
| 496 // Returns true if id is reserved. | 496 // Returns true if id is reserved. |
| 497 bool IsBufferReservedId(GLuint id); | 497 bool IsBufferReservedId(GLuint id); |
| 498 bool IsFramebufferReservedId(GLuint id) { return false; } | 498 bool IsFramebufferReservedId(GLuint id) { return false; } |
| 499 bool IsRenderbufferReservedId(GLuint id) { return false; } | 499 bool IsRenderbufferReservedId(GLuint id) { return false; } |
| 500 bool IsTextureReservedId(GLuint id) { return false; } | 500 bool IsTextureReservedId(GLuint id) { return false; } |
| 501 bool IsVertexArrayReservedId(GLuint id) { return false; } | 501 bool IsVertexArrayReservedId(GLuint id) { return false; } |
| 502 bool IsProgramReservedId(GLuint id) { return false; } | 502 bool IsProgramReservedId(GLuint id) { return false; } |
| 503 bool IsValuebufferReservedId(GLuint id) { return false; } |
| 503 | 504 |
| 504 bool BindBufferHelper(GLenum target, GLuint texture); | 505 bool BindBufferHelper(GLenum target, GLuint texture); |
| 505 bool BindFramebufferHelper(GLenum target, GLuint texture); | 506 bool BindFramebufferHelper(GLenum target, GLuint texture); |
| 506 bool BindRenderbufferHelper(GLenum target, GLuint texture); | 507 bool BindRenderbufferHelper(GLenum target, GLuint texture); |
| 507 bool BindTextureHelper(GLenum target, GLuint texture); | 508 bool BindTextureHelper(GLenum target, GLuint texture); |
| 508 bool BindVertexArrayOESHelper(GLuint array); | 509 bool BindVertexArrayOESHelper(GLuint array); |
| 510 bool BindValuebufferCHROMIUMHelper(GLenum target, GLuint valuebuffer); |
| 509 bool UseProgramHelper(GLuint program); | 511 bool UseProgramHelper(GLuint program); |
| 510 | 512 |
| 511 void GenBuffersHelper(GLsizei n, const GLuint* buffers); | 513 void GenBuffersHelper(GLsizei n, const GLuint* buffers); |
| 512 void GenFramebuffersHelper(GLsizei n, const GLuint* framebuffers); | 514 void GenFramebuffersHelper(GLsizei n, const GLuint* framebuffers); |
| 513 void GenRenderbuffersHelper(GLsizei n, const GLuint* renderbuffers); | 515 void GenRenderbuffersHelper(GLsizei n, const GLuint* renderbuffers); |
| 514 void GenTexturesHelper(GLsizei n, const GLuint* textures); | 516 void GenTexturesHelper(GLsizei n, const GLuint* textures); |
| 515 void GenVertexArraysOESHelper(GLsizei n, const GLuint* arrays); | 517 void GenVertexArraysOESHelper(GLsizei n, const GLuint* arrays); |
| 516 void GenQueriesEXTHelper(GLsizei n, const GLuint* queries); | 518 void GenQueriesEXTHelper(GLsizei n, const GLuint* queries); |
| 519 void GenValuebuffersCHROMIUMHelper(GLsizei n, const GLuint* valuebuffers); |
| 517 | 520 |
| 518 void DeleteBuffersHelper(GLsizei n, const GLuint* buffers); | 521 void DeleteBuffersHelper(GLsizei n, const GLuint* buffers); |
| 519 void DeleteFramebuffersHelper(GLsizei n, const GLuint* framebuffers); | 522 void DeleteFramebuffersHelper(GLsizei n, const GLuint* framebuffers); |
| 520 void DeleteRenderbuffersHelper(GLsizei n, const GLuint* renderbuffers); | 523 void DeleteRenderbuffersHelper(GLsizei n, const GLuint* renderbuffers); |
| 521 void DeleteTexturesHelper(GLsizei n, const GLuint* textures); | 524 void DeleteTexturesHelper(GLsizei n, const GLuint* textures); |
| 522 bool DeleteProgramHelper(GLuint program); | 525 bool DeleteProgramHelper(GLuint program); |
| 523 bool DeleteShaderHelper(GLuint shader); | 526 bool DeleteShaderHelper(GLuint shader); |
| 524 void DeleteQueriesEXTHelper(GLsizei n, const GLuint* queries); | 527 void DeleteQueriesEXTHelper(GLsizei n, const GLuint* queries); |
| 525 void DeleteVertexArraysOESHelper(GLsizei n, const GLuint* arrays); | 528 void DeleteVertexArraysOESHelper(GLsizei n, const GLuint* arrays); |
| 529 void DeleteValuebuffersCHROMIUMHelper(GLsizei n, const GLuint* valuebuffers); |
| 526 | 530 |
| 527 void DeleteBuffersStub(GLsizei n, const GLuint* buffers); | 531 void DeleteBuffersStub(GLsizei n, const GLuint* buffers); |
| 528 void DeleteFramebuffersStub(GLsizei n, const GLuint* framebuffers); | 532 void DeleteFramebuffersStub(GLsizei n, const GLuint* framebuffers); |
| 529 void DeleteRenderbuffersStub(GLsizei n, const GLuint* renderbuffers); | 533 void DeleteRenderbuffersStub(GLsizei n, const GLuint* renderbuffers); |
| 530 void DeleteTexturesStub(GLsizei n, const GLuint* textures); | 534 void DeleteTexturesStub(GLsizei n, const GLuint* textures); |
| 531 void DeleteProgramStub(GLsizei n, const GLuint* programs); | 535 void DeleteProgramStub(GLsizei n, const GLuint* programs); |
| 532 void DeleteShaderStub(GLsizei n, const GLuint* shaders); | 536 void DeleteShaderStub(GLsizei n, const GLuint* shaders); |
| 533 void DeleteVertexArraysOESStub(GLsizei n, const GLuint* arrays); | 537 void DeleteVertexArraysOESStub(GLsizei n, const GLuint* arrays); |
| 538 void DeleteValuebuffersCHROMIUMStub(GLsizei n, const GLuint* valuebuffers); |
| 534 | 539 |
| 535 void BufferDataHelper( | 540 void BufferDataHelper( |
| 536 GLenum target, GLsizeiptr size, const void* data, GLenum usage); | 541 GLenum target, GLsizeiptr size, const void* data, GLenum usage); |
| 537 void BufferSubDataHelper( | 542 void BufferSubDataHelper( |
| 538 GLenum target, GLintptr offset, GLsizeiptr size, const void* data); | 543 GLenum target, GLintptr offset, GLsizeiptr size, const void* data); |
| 539 void BufferSubDataHelperImpl( | 544 void BufferSubDataHelperImpl( |
| 540 GLenum target, GLintptr offset, GLsizeiptr size, const void* data, | 545 GLenum target, GLintptr offset, GLsizeiptr size, const void* data, |
| 541 ScopedTransferBufferPtr* buffer); | 546 ScopedTransferBufferPtr* buffer); |
| 542 | 547 |
| 543 GLuint CreateImageCHROMIUMHelper(ClientBuffer buffer, | 548 GLuint CreateImageCHROMIUMHelper(ClientBuffer buffer, |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 bool pack_reverse_row_order_; | 697 bool pack_reverse_row_order_; |
| 693 | 698 |
| 694 scoped_ptr<TextureUnit[]> texture_units_; | 699 scoped_ptr<TextureUnit[]> texture_units_; |
| 695 | 700 |
| 696 // 0 to gl_state_.max_combined_texture_image_units. | 701 // 0 to gl_state_.max_combined_texture_image_units. |
| 697 GLuint active_texture_unit_; | 702 GLuint active_texture_unit_; |
| 698 | 703 |
| 699 GLuint bound_framebuffer_; | 704 GLuint bound_framebuffer_; |
| 700 GLuint bound_read_framebuffer_; | 705 GLuint bound_read_framebuffer_; |
| 701 GLuint bound_renderbuffer_; | 706 GLuint bound_renderbuffer_; |
| 707 GLuint bound_valuebuffer_; |
| 702 | 708 |
| 703 // The program in use by glUseProgram | 709 // The program in use by glUseProgram |
| 704 GLuint current_program_; | 710 GLuint current_program_; |
| 705 | 711 |
| 706 // The currently bound array buffer. | 712 // The currently bound array buffer. |
| 707 GLuint bound_array_buffer_id_; | 713 GLuint bound_array_buffer_id_; |
| 708 | 714 |
| 709 // The currently bound pixel transfer buffers. | 715 // The currently bound pixel transfer buffers. |
| 710 GLuint bound_pixel_pack_transfer_buffer_id_; | 716 GLuint bound_pixel_pack_transfer_buffer_id_; |
| 711 GLuint bound_pixel_unpack_transfer_buffer_id_; | 717 GLuint bound_pixel_unpack_transfer_buffer_id_; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 | 819 |
| 814 inline bool GLES2Implementation::GetTexParameterivHelper( | 820 inline bool GLES2Implementation::GetTexParameterivHelper( |
| 815 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { | 821 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { |
| 816 return false; | 822 return false; |
| 817 } | 823 } |
| 818 | 824 |
| 819 } // namespace gles2 | 825 } // namespace gles2 |
| 820 } // namespace gpu | 826 } // namespace gpu |
| 821 | 827 |
| 822 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ | 828 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
| OLD | NEW |