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 <map> | 10 #include <map> |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 | 584 |
585 // Asserts that the context is lost. | 585 // Asserts that the context is lost. |
586 // NOTE: This is an expensive call and should only be called | 586 // NOTE: This is an expensive call and should only be called |
587 // for error checking. | 587 // for error checking. |
588 bool MustBeContextLost(); | 588 bool MustBeContextLost(); |
589 | 589 |
590 void RunIfContextNotLost(const base::Closure& callback); | 590 void RunIfContextNotLost(const base::Closure& callback); |
591 | 591 |
592 void OnSwapBuffersComplete(); | 592 void OnSwapBuffersComplete(); |
593 | 593 |
| 594 // Free transfer buffer if unused token already passed, or free pending |
| 595 // the unused token if not. |
| 596 void FreeTransferBuffer(BufferTracker::Buffer* buffer); |
| 597 |
| 598 // Internal async upload query. |
| 599 void BeginInternalQueryAsyncPixelUnpackCompleted( |
| 600 BufferTracker::Buffer *buffer); |
| 601 void EndInternalQueryAsyncPixelUnpackCompleted(); |
| 602 |
594 bool GetBoundPixelTransferBuffer( | 603 bool GetBoundPixelTransferBuffer( |
595 GLenum target, const char* function_name, GLuint* buffer_id); | 604 GLenum target, const char* function_name, GLuint* buffer_id); |
596 BufferTracker::Buffer* GetBoundPixelUnpackTransferBufferIfValid( | 605 BufferTracker::Buffer* GetBoundPixelUnpackTransferBufferIfValid( |
597 GLuint buffer_id, | 606 GLuint buffer_id, |
598 const char* function_name, GLuint offset, GLsizei size); | 607 const char* function_name, GLuint offset, GLsizei size); |
599 | 608 |
600 const std::string& GetLogPrefix() const; | 609 const std::string& GetLogPrefix() const; |
601 | 610 |
602 #if defined(GL_CLIENT_FAIL_GL_ERRORS) | 611 #if defined(GL_CLIENT_FAIL_GL_ERRORS) |
603 void CheckGLError(); | 612 void CheckGLError(); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 MappedBufferMap mapped_buffers_; | 700 MappedBufferMap mapped_buffers_; |
692 | 701 |
693 typedef std::map<const void*, MappedTexture> MappedTextureMap; | 702 typedef std::map<const void*, MappedTexture> MappedTextureMap; |
694 MappedTextureMap mapped_textures_; | 703 MappedTextureMap mapped_textures_; |
695 | 704 |
696 scoped_ptr<MappedMemoryManager> mapped_memory_; | 705 scoped_ptr<MappedMemoryManager> mapped_memory_; |
697 | 706 |
698 scoped_refptr<ShareGroup> share_group_; | 707 scoped_refptr<ShareGroup> share_group_; |
699 | 708 |
700 scoped_ptr<QueryTracker> query_tracker_; | 709 scoped_ptr<QueryTracker> query_tracker_; |
701 typedef std::map<GLuint, QueryTracker::Query*> QueryMap; | 710 typedef std::pair<GLuint, bool> QueryKey; |
| 711 typedef std::map<QueryKey, QueryTracker::Query*> QueryMap; |
702 QueryMap current_queries_; | 712 QueryMap current_queries_; |
703 | 713 |
704 scoped_ptr<BufferTracker> buffer_tracker_; | 714 scoped_ptr<BufferTracker> buffer_tracker_; |
705 | 715 |
706 scoped_ptr<GpuMemoryBufferTracker> gpu_memory_buffer_tracker_; | 716 scoped_ptr<GpuMemoryBufferTracker> gpu_memory_buffer_tracker_; |
707 | 717 |
708 ErrorMessageCallback* error_message_callback_; | 718 ErrorMessageCallback* error_message_callback_; |
709 | 719 |
710 scoped_ptr<std::string> current_trace_name_; | 720 scoped_ptr<std::string> current_trace_name_; |
711 | 721 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 | 764 |
755 inline bool GLES2Implementation::GetTexParameterivHelper( | 765 inline bool GLES2Implementation::GetTexParameterivHelper( |
756 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { | 766 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { |
757 return false; | 767 return false; |
758 } | 768 } |
759 | 769 |
760 } // namespace gles2 | 770 } // namespace gles2 |
761 } // namespace gpu | 771 } // namespace gpu |
762 | 772 |
763 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ | 773 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
OLD | NEW |