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 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 | 503 |
504 // Helper for GetVertexAttrib | 504 // Helper for GetVertexAttrib |
505 bool GetVertexAttribHelper(GLuint index, GLenum pname, uint32* param); | 505 bool GetVertexAttribHelper(GLuint index, GLenum pname, uint32* param); |
506 | 506 |
507 GLuint GetMaxValueInBufferCHROMIUMHelper( | 507 GLuint GetMaxValueInBufferCHROMIUMHelper( |
508 GLuint buffer_id, GLsizei count, GLenum type, GLuint offset); | 508 GLuint buffer_id, GLsizei count, GLenum type, GLuint offset); |
509 | 509 |
510 void RestoreElementAndArrayBuffers(bool restore); | 510 void RestoreElementAndArrayBuffers(bool restore); |
511 void RestoreArrayBuffer(bool restrore); | 511 void RestoreArrayBuffer(bool restrore); |
512 | 512 |
513 // The pixels pointer should already account for unpack skip rows and skip | 513 // The pixels pointer should already account for unpack skip |
514 // pixels. | 514 // images/rows/pixels. |
515 void TexSubImage2DImpl( | 515 void TexSubImage2DImpl( |
516 GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, | 516 GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, |
517 GLsizei height, GLenum format, GLenum type, uint32 unpadded_row_size, | 517 GLsizei height, GLenum format, GLenum type, uint32 unpadded_row_size, |
518 const void* pixels, uint32 pixels_padded_row_size, GLboolean internal, | 518 const void* pixels, uint32 pixels_padded_row_size, GLboolean internal, |
519 ScopedTransferBufferPtr* buffer, uint32 buffer_padded_row_size); | 519 ScopedTransferBufferPtr* buffer, uint32 buffer_padded_row_size); |
| 520 void TexSubImage3DImpl( |
| 521 GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, |
| 522 GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, |
| 523 uint32 unpadded_row_size, const void* pixels, |
| 524 uint32 pixels_padded_row_size, GLboolean internal, |
| 525 ScopedTransferBufferPtr* buffer, uint32 buffer_padded_row_size); |
520 | 526 |
521 // Helpers for query functions. | 527 // Helpers for query functions. |
522 bool GetHelper(GLenum pname, GLint* params); | 528 bool GetHelper(GLenum pname, GLint* params); |
523 bool GetBooleanvHelper(GLenum pname, GLboolean* params); | 529 bool GetBooleanvHelper(GLenum pname, GLboolean* params); |
524 bool GetBufferParameterivHelper(GLenum target, GLenum pname, GLint* params); | 530 bool GetBufferParameterivHelper(GLenum target, GLenum pname, GLint* params); |
525 bool GetFloatvHelper(GLenum pname, GLfloat* params); | 531 bool GetFloatvHelper(GLenum pname, GLfloat* params); |
526 bool GetFramebufferAttachmentParameterivHelper( | 532 bool GetFramebufferAttachmentParameterivHelper( |
527 GLenum target, GLenum attachment, GLenum pname, GLint* params); | 533 GLenum target, GLenum attachment, GLenum pname, GLint* params); |
528 bool GetIntegervHelper(GLenum pname, GLint* params); | 534 bool GetIntegervHelper(GLenum pname, GLint* params); |
529 bool GetInternalformativHelper( | 535 bool GetInternalformativHelper( |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 | 639 |
634 // unpack alignment as last set by glPixelStorei | 640 // unpack alignment as last set by glPixelStorei |
635 GLint unpack_alignment_; | 641 GLint unpack_alignment_; |
636 | 642 |
637 // unpack yflip as last set by glPixelstorei | 643 // unpack yflip as last set by glPixelstorei |
638 bool unpack_flip_y_; | 644 bool unpack_flip_y_; |
639 | 645 |
640 // unpack row length as last set by glPixelStorei | 646 // unpack row length as last set by glPixelStorei |
641 GLint unpack_row_length_; | 647 GLint unpack_row_length_; |
642 | 648 |
| 649 // unpack image height as last set by glPixelStorei |
| 650 GLint unpack_image_height_; |
| 651 |
643 // unpack skip rows as last set by glPixelStorei | 652 // unpack skip rows as last set by glPixelStorei |
644 GLint unpack_skip_rows_; | 653 GLint unpack_skip_rows_; |
645 | 654 |
646 // unpack skip pixels as last set by glPixelStorei | 655 // unpack skip pixels as last set by glPixelStorei |
647 GLint unpack_skip_pixels_; | 656 GLint unpack_skip_pixels_; |
648 | 657 |
| 658 // unpack skip images as last set by glPixelStorei |
| 659 GLint unpack_skip_images_; |
| 660 |
649 // pack reverse row order as last set by glPixelstorei | 661 // pack reverse row order as last set by glPixelstorei |
650 bool pack_reverse_row_order_; | 662 bool pack_reverse_row_order_; |
651 | 663 |
652 scoped_ptr<TextureUnit[]> texture_units_; | 664 scoped_ptr<TextureUnit[]> texture_units_; |
653 | 665 |
654 // 0 to gl_state_.max_combined_texture_image_units. | 666 // 0 to gl_state_.max_combined_texture_image_units. |
655 GLuint active_texture_unit_; | 667 GLuint active_texture_unit_; |
656 | 668 |
657 GLuint bound_framebuffer_; | 669 GLuint bound_framebuffer_; |
658 GLuint bound_read_framebuffer_; | 670 GLuint bound_read_framebuffer_; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 | 736 |
725 scoped_ptr<QueryTracker> query_tracker_; | 737 scoped_ptr<QueryTracker> query_tracker_; |
726 typedef std::map<GLuint, QueryTracker::Query*> QueryMap; | 738 typedef std::map<GLuint, QueryTracker::Query*> QueryMap; |
727 QueryMap current_queries_; | 739 QueryMap current_queries_; |
728 scoped_ptr<IdAllocator> query_id_allocator_; | 740 scoped_ptr<IdAllocator> query_id_allocator_; |
729 | 741 |
730 scoped_ptr<BufferTracker> buffer_tracker_; | 742 scoped_ptr<BufferTracker> buffer_tracker_; |
731 | 743 |
732 GLES2ImplementationErrorMessageCallback* error_message_callback_; | 744 GLES2ImplementationErrorMessageCallback* error_message_callback_; |
733 | 745 |
734 scoped_ptr<std::string> current_trace_category_; | 746 int current_trace_stack_; |
735 scoped_ptr<std::string> current_trace_name_; | |
736 | 747 |
737 GpuControl* gpu_control_; | 748 GpuControl* gpu_control_; |
738 | 749 |
739 Capabilities capabilities_; | 750 Capabilities capabilities_; |
740 | 751 |
741 base::WeakPtrFactory<GLES2Implementation> weak_ptr_factory_; | 752 base::WeakPtrFactory<GLES2Implementation> weak_ptr_factory_; |
742 | 753 |
743 DISALLOW_COPY_AND_ASSIGN(GLES2Implementation); | 754 DISALLOW_COPY_AND_ASSIGN(GLES2Implementation); |
744 }; | 755 }; |
745 | 756 |
(...skipping 27 matching lines...) Expand all Loading... |
773 | 784 |
774 inline bool GLES2Implementation::GetTexParameterivHelper( | 785 inline bool GLES2Implementation::GetTexParameterivHelper( |
775 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { | 786 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { |
776 return false; | 787 return false; |
777 } | 788 } |
778 | 789 |
779 } // namespace gles2 | 790 } // namespace gles2 |
780 } // namespace gpu | 791 } // namespace gpu |
781 | 792 |
782 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ | 793 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
OLD | NEW |