| 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 // Insert async token. In the GLES2 command buffer, is implemented to |
| 599 // enumerate and synchronize asynchronous pixel uploads. |
| 600 void InsertAsyncPixelUnpackToken(BufferTracker::Buffer *buffer); |
| 601 |
| 602 void MarkPixelTransferBufferLastUsage(BufferTracker::Buffer* buffer); |
| 603 |
| 594 bool GetBoundPixelTransferBuffer( | 604 bool GetBoundPixelTransferBuffer( |
| 595 GLenum target, const char* function_name, GLuint* buffer_id); | 605 GLenum target, const char* function_name, GLuint* buffer_id); |
| 596 BufferTracker::Buffer* GetBoundPixelUnpackTransferBufferIfValid( | 606 BufferTracker::Buffer* GetBoundPixelUnpackTransferBufferIfValid( |
| 597 GLuint buffer_id, | 607 GLuint buffer_id, |
| 598 const char* function_name, GLuint offset, GLsizei size); | 608 const char* function_name, GLuint offset, GLsizei size); |
| 599 | 609 |
| 600 const std::string& GetLogPrefix() const; | 610 const std::string& GetLogPrefix() const; |
| 601 | 611 |
| 602 #if defined(GL_CLIENT_FAIL_GL_ERRORS) | 612 #if defined(GL_CLIENT_FAIL_GL_ERRORS) |
| 603 void CheckGLError(); | 613 void CheckGLError(); |
| (...skipping 150 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 |