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