| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 static const GLuint kClientSideElementArrayId = 0xFEDCBA99u; | 182 static const GLuint kClientSideElementArrayId = 0xFEDCBA99u; |
| 183 | 183 |
| 184 // Number of swap buffers allowed before waiting. | 184 // Number of swap buffers allowed before waiting. |
| 185 static const size_t kMaxSwapBuffers = 2; | 185 static const size_t kMaxSwapBuffers = 2; |
| 186 | 186 |
| 187 GLES2Implementation(GLES2CmdHelper* helper, | 187 GLES2Implementation(GLES2CmdHelper* helper, |
| 188 ShareGroup* share_group, | 188 ShareGroup* share_group, |
| 189 TransferBufferInterface* transfer_buffer, | 189 TransferBufferInterface* transfer_buffer, |
| 190 bool bind_generates_resource, | 190 bool bind_generates_resource, |
| 191 bool lose_context_when_out_of_memory, | 191 bool lose_context_when_out_of_memory, |
| 192 bool support_client_side_arrays, |
| 192 GpuControl* gpu_control); | 193 GpuControl* gpu_control); |
| 193 | 194 |
| 194 ~GLES2Implementation() override; | 195 ~GLES2Implementation() override; |
| 195 | 196 |
| 196 bool Initialize( | 197 bool Initialize( |
| 197 unsigned int starting_transfer_buffer_size, | 198 unsigned int starting_transfer_buffer_size, |
| 198 unsigned int min_transfer_buffer_size, | 199 unsigned int min_transfer_buffer_size, |
| 199 unsigned int max_transfer_buffer_size, | 200 unsigned int max_transfer_buffer_size, |
| 200 unsigned int mapped_memory_limit); | 201 unsigned int mapped_memory_limit); |
| 201 | 202 |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 | 730 |
| 730 // Current GL error bits. | 731 // Current GL error bits. |
| 731 uint32 error_bits_; | 732 uint32 error_bits_; |
| 732 | 733 |
| 733 // Whether or not to print debugging info. | 734 // Whether or not to print debugging info. |
| 734 bool debug_; | 735 bool debug_; |
| 735 | 736 |
| 736 // When true, the context is lost when a GL_OUT_OF_MEMORY error occurs. | 737 // When true, the context is lost when a GL_OUT_OF_MEMORY error occurs. |
| 737 bool lose_context_when_out_of_memory_; | 738 bool lose_context_when_out_of_memory_; |
| 738 | 739 |
| 740 // Whether or not to support client side arrays. |
| 741 bool support_client_side_arrays_; |
| 742 |
| 739 // Used to check for single threaded access. | 743 // Used to check for single threaded access. |
| 740 int use_count_; | 744 int use_count_; |
| 741 | 745 |
| 742 // Map of GLenum to Strings for glGetString. We need to cache these because | 746 // Map of GLenum to Strings for glGetString. We need to cache these because |
| 743 // the pointer passed back to the client has to remain valid for eternity. | 747 // the pointer passed back to the client has to remain valid for eternity. |
| 744 typedef std::map<uint32, std::set<std::string> > GLStringMap; | 748 typedef std::map<uint32, std::set<std::string> > GLStringMap; |
| 745 GLStringMap gl_strings_; | 749 GLStringMap gl_strings_; |
| 746 | 750 |
| 747 // Similar cache for glGetRequestableExtensionsCHROMIUM. We don't | 751 // Similar cache for glGetRequestableExtensionsCHROMIUM. We don't |
| 748 // have an enum for this so handle it separately. | 752 // have an enum for this so handle it separately. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 | 813 |
| 810 inline bool GLES2Implementation::GetTexParameterivHelper( | 814 inline bool GLES2Implementation::GetTexParameterivHelper( |
| 811 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { | 815 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { |
| 812 return false; | 816 return false; |
| 813 } | 817 } |
| 814 | 818 |
| 815 } // namespace gles2 | 819 } // namespace gles2 |
| 816 } // namespace gpu | 820 } // namespace gpu |
| 817 | 821 |
| 818 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ | 822 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
| OLD | NEW |