| 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> |
| 11 #include <queue> | 11 #include <queue> |
| 12 #include <set> | 12 #include <set> |
| 13 #include <string> | 13 #include <string> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "gles2_impl_export.h" | 17 #include "gles2_impl_export.h" |
| 18 #include "gpu/command_buffer/client/buffer_tracker.h" | 18 #include "gpu/command_buffer/client/buffer_tracker.h" |
| 19 #include "gpu/command_buffer/client/client_context_state.h" | 19 #include "gpu/command_buffer/client/client_context_state.h" |
| 20 #include "gpu/command_buffer/client/gles2_cmd_helper.h" | 20 #include "gpu/command_buffer/client/gles2_cmd_helper.h" |
| 21 #include "gpu/command_buffer/client/gles2_interface.h" | 21 #include "gpu/command_buffer/client/gles2_interface.h" |
| 22 #include "gpu/command_buffer/client/gpu_memory_buffer_tracker.h" | 22 #include "gpu/command_buffer/client/gpu_memory_buffer_tracker.h" |
| 23 #include "gpu/command_buffer/client/image_factory.h" | |
| 24 #include "gpu/command_buffer/client/query_tracker.h" | 23 #include "gpu/command_buffer/client/query_tracker.h" |
| 25 #include "gpu/command_buffer/client/ref_counted.h" | 24 #include "gpu/command_buffer/client/ref_counted.h" |
| 26 #include "gpu/command_buffer/client/ring_buffer.h" | 25 #include "gpu/command_buffer/client/ring_buffer.h" |
| 27 #include "gpu/command_buffer/client/share_group.h" | 26 #include "gpu/command_buffer/client/share_group.h" |
| 28 #include "gpu/command_buffer/common/compiler_specific.h" | 27 #include "gpu/command_buffer/common/compiler_specific.h" |
| 29 #include "gpu/command_buffer/common/debug_marker_manager.h" | 28 #include "gpu/command_buffer/common/debug_marker_manager.h" |
| 30 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 29 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 31 | 30 |
| 32 #if !defined(NDEBUG) && !defined(__native_client__) && !defined(GLES2_CONFORMANC
E_TESTS) // NOLINT | 31 #if !defined(NDEBUG) && !defined(__native_client__) && !defined(GLES2_CONFORMANC
E_TESTS) // NOLINT |
| 33 #if defined(GLES2_INLINE_OPTIMIZATION) | 32 #if defined(GLES2_INLINE_OPTIMIZATION) |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 static const GLuint kClientSideArrayId = 0xFEDCBA98u; | 168 static const GLuint kClientSideArrayId = 0xFEDCBA98u; |
| 170 static const GLuint kClientSideElementArrayId = 0xFEDCBA99u; | 169 static const GLuint kClientSideElementArrayId = 0xFEDCBA99u; |
| 171 | 170 |
| 172 // Number of swap buffers allowed before waiting. | 171 // Number of swap buffers allowed before waiting. |
| 173 static const size_t kMaxSwapBuffers = 2; | 172 static const size_t kMaxSwapBuffers = 2; |
| 174 | 173 |
| 175 GLES2Implementation( | 174 GLES2Implementation( |
| 176 GLES2CmdHelper* helper, | 175 GLES2CmdHelper* helper, |
| 177 ShareGroup* share_group, | 176 ShareGroup* share_group, |
| 178 TransferBufferInterface* transfer_buffer, | 177 TransferBufferInterface* transfer_buffer, |
| 179 bool bind_generates_resource, | 178 bool bind_generates_resource); |
| 180 ImageFactory* image_factory); | |
| 181 | 179 |
| 182 virtual ~GLES2Implementation(); | 180 virtual ~GLES2Implementation(); |
| 183 | 181 |
| 184 bool Initialize( | 182 bool Initialize( |
| 185 unsigned int starting_transfer_buffer_size, | 183 unsigned int starting_transfer_buffer_size, |
| 186 unsigned int min_transfer_buffer_size, | 184 unsigned int min_transfer_buffer_size, |
| 187 unsigned int max_transfer_buffer_size); | 185 unsigned int max_transfer_buffer_size); |
| 188 | 186 |
| 189 // The GLES2CmdHelper being used by this GLES2Implementation. You can use | 187 // The GLES2CmdHelper being used by this GLES2Implementation. You can use |
| 190 // this to issue cmds at a lower level for certain kinds of optimization. | 188 // this to issue cmds at a lower level for certain kinds of optimization. |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 QueryTracker::Query* current_query_; | 659 QueryTracker::Query* current_query_; |
| 662 | 660 |
| 663 scoped_ptr<BufferTracker> buffer_tracker_; | 661 scoped_ptr<BufferTracker> buffer_tracker_; |
| 664 | 662 |
| 665 scoped_ptr<GpuMemoryBufferTracker> gpu_memory_buffer_tracker_; | 663 scoped_ptr<GpuMemoryBufferTracker> gpu_memory_buffer_tracker_; |
| 666 | 664 |
| 667 ErrorMessageCallback* error_message_callback_; | 665 ErrorMessageCallback* error_message_callback_; |
| 668 | 666 |
| 669 scoped_ptr<std::string> current_trace_name_; | 667 scoped_ptr<std::string> current_trace_name_; |
| 670 | 668 |
| 671 ImageFactory* image_factory_; | |
| 672 | |
| 673 DISALLOW_COPY_AND_ASSIGN(GLES2Implementation); | 669 DISALLOW_COPY_AND_ASSIGN(GLES2Implementation); |
| 674 }; | 670 }; |
| 675 | 671 |
| 676 inline bool GLES2Implementation::GetBufferParameterivHelper( | 672 inline bool GLES2Implementation::GetBufferParameterivHelper( |
| 677 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { | 673 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { |
| 678 return false; | 674 return false; |
| 679 } | 675 } |
| 680 | 676 |
| 681 inline bool GLES2Implementation::GetFramebufferAttachmentParameterivHelper( | 677 inline bool GLES2Implementation::GetFramebufferAttachmentParameterivHelper( |
| 682 GLenum /* target */, | 678 GLenum /* target */, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 703 | 699 |
| 704 inline bool GLES2Implementation::GetTexParameterivHelper( | 700 inline bool GLES2Implementation::GetTexParameterivHelper( |
| 705 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { | 701 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { |
| 706 return false; | 702 return false; |
| 707 } | 703 } |
| 708 | 704 |
| 709 } // namespace gles2 | 705 } // namespace gles2 |
| 710 } // namespace gpu | 706 } // namespace gpu |
| 711 | 707 |
| 712 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ | 708 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
| OLD | NEW |