| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 | 278 |
| 279 ShareGroupContextData* share_group_context_data() { | 279 ShareGroupContextData* share_group_context_data() { |
| 280 return &share_group_context_data_; | 280 return &share_group_context_data_; |
| 281 } | 281 } |
| 282 | 282 |
| 283 private: | 283 private: |
| 284 friend class GLES2ImplementationTest; | 284 friend class GLES2ImplementationTest; |
| 285 friend class VertexArrayObjectManager; | 285 friend class VertexArrayObjectManager; |
| 286 friend class QueryTracker; | 286 friend class QueryTracker; |
| 287 | 287 |
| 288 using IdNamespaces = id_namespaces::IdNamespaces; |
| 289 |
| 288 // Used to track whether an extension is available | 290 // Used to track whether an extension is available |
| 289 enum ExtensionStatus { | 291 enum ExtensionStatus { |
| 290 kAvailableExtensionStatus, | 292 kAvailableExtensionStatus, |
| 291 kUnavailableExtensionStatus, | 293 kUnavailableExtensionStatus, |
| 292 kUnknownExtensionStatus | 294 kUnknownExtensionStatus |
| 293 }; | 295 }; |
| 294 | 296 |
| 295 enum Dimension { | 297 enum Dimension { |
| 296 k2D, | 298 k2D, |
| 297 k3D, | 299 k3D, |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 void BindSamplerHelper(GLuint unit, GLuint sampler); | 484 void BindSamplerHelper(GLuint unit, GLuint sampler); |
| 483 void BindTextureHelper(GLenum target, GLuint texture); | 485 void BindTextureHelper(GLenum target, GLuint texture); |
| 484 void BindTransformFeedbackHelper(GLenum target, GLuint transformfeedback); | 486 void BindTransformFeedbackHelper(GLenum target, GLuint transformfeedback); |
| 485 void BindVertexArrayOESHelper(GLuint array); | 487 void BindVertexArrayOESHelper(GLuint array); |
| 486 void UseProgramHelper(GLuint program); | 488 void UseProgramHelper(GLuint program); |
| 487 | 489 |
| 488 void BindBufferStub(GLenum target, GLuint buffer); | 490 void BindBufferStub(GLenum target, GLuint buffer); |
| 489 void BindBufferBaseStub(GLenum target, GLuint index, GLuint buffer); | 491 void BindBufferBaseStub(GLenum target, GLuint index, GLuint buffer); |
| 490 void BindBufferRangeStub(GLenum target, GLuint index, GLuint buffer, | 492 void BindBufferRangeStub(GLenum target, GLuint index, GLuint buffer, |
| 491 GLintptr offset, GLsizeiptr size); | 493 GLintptr offset, GLsizeiptr size); |
| 492 void BindFramebufferStub(GLenum target, GLuint framebuffer); | |
| 493 void BindRenderbufferStub(GLenum target, GLuint renderbuffer); | 494 void BindRenderbufferStub(GLenum target, GLuint renderbuffer); |
| 494 void BindTextureStub(GLenum target, GLuint texture); | 495 void BindTextureStub(GLenum target, GLuint texture); |
| 495 | 496 |
| 496 void GenBuffersHelper(GLsizei n, const GLuint* buffers); | 497 void GenBuffersHelper(GLsizei n, const GLuint* buffers); |
| 497 void GenFramebuffersHelper(GLsizei n, const GLuint* framebuffers); | 498 void GenFramebuffersHelper(GLsizei n, const GLuint* framebuffers); |
| 498 void GenRenderbuffersHelper(GLsizei n, const GLuint* renderbuffers); | 499 void GenRenderbuffersHelper(GLsizei n, const GLuint* renderbuffers); |
| 499 void GenTexturesHelper(GLsizei n, const GLuint* textures); | 500 void GenTexturesHelper(GLsizei n, const GLuint* textures); |
| 500 void GenVertexArraysOESHelper(GLsizei n, const GLuint* arrays); | 501 void GenVertexArraysOESHelper(GLsizei n, const GLuint* arrays); |
| 501 void GenQueriesEXTHelper(GLsizei n, const GLuint* queries); | 502 void GenQueriesEXTHelper(GLsizei n, const GLuint* queries); |
| 502 void GenSamplersHelper(GLsizei n, const GLuint* samplers); | 503 void GenSamplersHelper(GLsizei n, const GLuint* samplers); |
| 503 void GenTransformFeedbacksHelper(GLsizei n, const GLuint* transformfeedbacks); | 504 void GenTransformFeedbacksHelper(GLsizei n, const GLuint* transformfeedbacks); |
| 504 | 505 |
| 505 void DeleteBuffersHelper(GLsizei n, const GLuint* buffers); | 506 void DeleteBuffersHelper(GLsizei n, const GLuint* buffers); |
| 506 void DeleteFramebuffersHelper(GLsizei n, const GLuint* framebuffers); | 507 void DeleteFramebuffersHelper(GLsizei n, const GLuint* framebuffers); |
| 507 void DeleteRenderbuffersHelper(GLsizei n, const GLuint* renderbuffers); | 508 void DeleteRenderbuffersHelper(GLsizei n, const GLuint* renderbuffers); |
| 508 void DeleteTexturesHelper(GLsizei n, const GLuint* textures); | 509 void DeleteTexturesHelper(GLsizei n, const GLuint* textures); |
| 509 bool DeleteProgramHelper(GLuint program); | 510 bool DeleteProgramHelper(GLuint program); |
| 510 bool DeleteShaderHelper(GLuint shader); | 511 bool DeleteShaderHelper(GLuint shader); |
| 511 void DeleteQueriesEXTHelper(GLsizei n, const GLuint* queries); | 512 void DeleteQueriesEXTHelper(GLsizei n, const GLuint* queries); |
| 512 void DeleteVertexArraysOESHelper(GLsizei n, const GLuint* arrays); | 513 void DeleteVertexArraysOESHelper(GLsizei n, const GLuint* arrays); |
| 513 void DeleteSamplersHelper(GLsizei n, const GLuint* samplers); | 514 void DeleteSamplersHelper(GLsizei n, const GLuint* samplers); |
| 514 void DeleteTransformFeedbacksHelper( | 515 void DeleteTransformFeedbacksHelper( |
| 515 GLsizei n, const GLuint* transformfeedbacks); | 516 GLsizei n, const GLuint* transformfeedbacks); |
| 516 void DeleteSyncHelper(GLsync sync); | 517 void DeleteSyncHelper(GLsync sync); |
| 517 | 518 |
| 518 void DeleteBuffersStub(GLsizei n, const GLuint* buffers); | 519 void DeleteBuffersStub(GLsizei n, const GLuint* buffers); |
| 519 void DeleteFramebuffersStub(GLsizei n, const GLuint* framebuffers); | |
| 520 void DeleteRenderbuffersStub(GLsizei n, const GLuint* renderbuffers); | 520 void DeleteRenderbuffersStub(GLsizei n, const GLuint* renderbuffers); |
| 521 void DeleteTexturesStub(GLsizei n, const GLuint* textures); | 521 void DeleteTexturesStub(GLsizei n, const GLuint* textures); |
| 522 void DeletePathsCHROMIUMStub(GLuint first_client_id, GLsizei range); | 522 void DeletePathsCHROMIUMStub(GLuint first_client_id, GLsizei range); |
| 523 void DeleteProgramStub(GLsizei n, const GLuint* programs); | 523 void DeleteProgramStub(GLsizei n, const GLuint* programs); |
| 524 void DeleteShaderStub(GLsizei n, const GLuint* shaders); | 524 void DeleteShaderStub(GLsizei n, const GLuint* shaders); |
| 525 void DeleteVertexArraysOESStub(GLsizei n, const GLuint* arrays); | |
| 526 void DeleteSamplersStub(GLsizei n, const GLuint* samplers); | 525 void DeleteSamplersStub(GLsizei n, const GLuint* samplers); |
| 527 void DeleteTransformFeedbacksStub( | |
| 528 GLsizei n, const GLuint* transformfeedbacks); | |
| 529 void DeleteSyncStub(GLsizei n, const GLuint* syncs); | 526 void DeleteSyncStub(GLsizei n, const GLuint* syncs); |
| 530 | 527 |
| 531 void BufferDataHelper( | 528 void BufferDataHelper( |
| 532 GLenum target, GLsizeiptr size, const void* data, GLenum usage); | 529 GLenum target, GLsizeiptr size, const void* data, GLenum usage); |
| 533 void BufferSubDataHelper( | 530 void BufferSubDataHelper( |
| 534 GLenum target, GLintptr offset, GLsizeiptr size, const void* data); | 531 GLenum target, GLintptr offset, GLsizeiptr size, const void* data); |
| 535 void BufferSubDataHelperImpl( | 532 void BufferSubDataHelperImpl( |
| 536 GLenum target, GLintptr offset, GLsizeiptr size, const void* data, | 533 GLenum target, GLintptr offset, GLsizeiptr size, const void* data, |
| 537 ScopedTransferBufferPtr* buffer); | 534 ScopedTransferBufferPtr* buffer); |
| 538 | 535 |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 | 800 |
| 804 typedef std::map<const void*, MappedTexture> MappedTextureMap; | 801 typedef std::map<const void*, MappedTexture> MappedTextureMap; |
| 805 MappedTextureMap mapped_textures_; | 802 MappedTextureMap mapped_textures_; |
| 806 | 803 |
| 807 std::unique_ptr<MappedMemoryManager> mapped_memory_; | 804 std::unique_ptr<MappedMemoryManager> mapped_memory_; |
| 808 | 805 |
| 809 scoped_refptr<ShareGroup> share_group_; | 806 scoped_refptr<ShareGroup> share_group_; |
| 810 ShareGroupContextData share_group_context_data_; | 807 ShareGroupContextData share_group_context_data_; |
| 811 | 808 |
| 812 std::unique_ptr<QueryTracker> query_tracker_; | 809 std::unique_ptr<QueryTracker> query_tracker_; |
| 813 std::unique_ptr<IdAllocator> query_id_allocator_; | 810 std::unique_ptr<IdAllocator> |
| 811 id_allocators_[static_cast<int>(IdNamespaces::kNumIdNamespaces)]; |
| 814 | 812 |
| 815 std::unique_ptr<BufferTracker> buffer_tracker_; | 813 std::unique_ptr<BufferTracker> buffer_tracker_; |
| 816 | 814 |
| 817 base::Callback<void(const char*, int32_t)> error_message_callback_; | 815 base::Callback<void(const char*, int32_t)> error_message_callback_; |
| 818 base::Closure lost_context_callback_; | 816 base::Closure lost_context_callback_; |
| 819 bool lost_context_callback_run_ = false; | 817 bool lost_context_callback_run_ = false; |
| 820 | 818 |
| 821 int current_trace_stack_; | 819 int current_trace_stack_; |
| 822 | 820 |
| 823 GpuControl* const gpu_control_; | 821 GpuControl* const gpu_control_; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 878 | 876 |
| 879 inline bool GLES2Implementation::GetTexParameterivHelper( | 877 inline bool GLES2Implementation::GetTexParameterivHelper( |
| 880 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { | 878 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { |
| 881 return false; | 879 return false; |
| 882 } | 880 } |
| 883 | 881 |
| 884 } // namespace gles2 | 882 } // namespace gles2 |
| 885 } // namespace gpu | 883 } // namespace gpu |
| 886 | 884 |
| 887 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ | 885 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
| OLD | NEW |