| 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 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 | 591 |
| 592 bool IsExtensionAvailable(const char* ext); | 592 bool IsExtensionAvailable(const char* ext); |
| 593 | 593 |
| 594 // Caches certain capabilties state. Return true if cached. | 594 // Caches certain capabilties state. Return true if cached. |
| 595 bool SetCapabilityState(GLenum cap, bool enabled); | 595 bool SetCapabilityState(GLenum cap, bool enabled); |
| 596 | 596 |
| 597 IdHandlerInterface* GetIdHandler(int id_namespace) const; | 597 IdHandlerInterface* GetIdHandler(int id_namespace) const; |
| 598 // IdAllocators for objects that can't be shared among contexts. | 598 // IdAllocators for objects that can't be shared among contexts. |
| 599 // For now, used only for Queries. TODO(hj.r.chung) Should be added for | 599 // For now, used only for Queries. TODO(hj.r.chung) Should be added for |
| 600 // Framebuffer and Vertex array objects. | 600 // Framebuffer and Vertex array objects. |
| 601 IdAllocatorInterface* GetIdAllocator(int id_namespace) const; | 601 IdAllocator* GetIdAllocator(int id_namespace) const; |
| 602 | 602 |
| 603 void FinishHelper(); | 603 void FinishHelper(); |
| 604 | 604 |
| 605 void RunIfContextNotLost(const base::Closure& callback); | 605 void RunIfContextNotLost(const base::Closure& callback); |
| 606 | 606 |
| 607 void OnSwapBuffersComplete(); | 607 void OnSwapBuffersComplete(); |
| 608 | 608 |
| 609 // Validate if an offset is valid, i.e., non-negative and fit into 32-bit. | 609 // Validate if an offset is valid, i.e., non-negative and fit into 32-bit. |
| 610 // If not, generate an approriate error, and return false. | 610 // If not, generate an approriate error, and return false. |
| 611 bool ValidateOffset(const char* func, GLintptr offset); | 611 bool ValidateOffset(const char* func, GLintptr offset); |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 MappedTextureMap mapped_textures_; | 764 MappedTextureMap mapped_textures_; |
| 765 | 765 |
| 766 scoped_ptr<MappedMemoryManager> mapped_memory_; | 766 scoped_ptr<MappedMemoryManager> mapped_memory_; |
| 767 | 767 |
| 768 scoped_refptr<ShareGroup> share_group_; | 768 scoped_refptr<ShareGroup> share_group_; |
| 769 ShareGroupContextData share_group_context_data_; | 769 ShareGroupContextData share_group_context_data_; |
| 770 | 770 |
| 771 scoped_ptr<QueryTracker> query_tracker_; | 771 scoped_ptr<QueryTracker> query_tracker_; |
| 772 typedef std::map<GLuint, QueryTracker::Query*> QueryMap; | 772 typedef std::map<GLuint, QueryTracker::Query*> QueryMap; |
| 773 QueryMap current_queries_; | 773 QueryMap current_queries_; |
| 774 scoped_ptr<IdAllocatorInterface> query_id_allocator_; | 774 scoped_ptr<IdAllocator> query_id_allocator_; |
| 775 | 775 |
| 776 scoped_ptr<BufferTracker> buffer_tracker_; | 776 scoped_ptr<BufferTracker> buffer_tracker_; |
| 777 | 777 |
| 778 scoped_ptr<GpuMemoryBufferTracker> gpu_memory_buffer_tracker_; | 778 scoped_ptr<GpuMemoryBufferTracker> gpu_memory_buffer_tracker_; |
| 779 | 779 |
| 780 GLES2ImplementationErrorMessageCallback* error_message_callback_; | 780 GLES2ImplementationErrorMessageCallback* error_message_callback_; |
| 781 | 781 |
| 782 scoped_ptr<std::string> current_trace_name_; | 782 scoped_ptr<std::string> current_trace_name_; |
| 783 | 783 |
| 784 GpuControl* gpu_control_; | 784 GpuControl* gpu_control_; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 822 | 822 |
| 823 inline bool GLES2Implementation::GetTexParameterivHelper( | 823 inline bool GLES2Implementation::GetTexParameterivHelper( |
| 824 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { | 824 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { |
| 825 return false; | 825 return false; |
| 826 } | 826 } |
| 827 | 827 |
| 828 } // namespace gles2 | 828 } // namespace gles2 |
| 829 } // namespace gpu | 829 } // namespace gpu |
| 830 | 830 |
| 831 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ | 831 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
| OLD | NEW |