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_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
7 | 7 |
8 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 8 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
9 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 9 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
10 #include "gpu/command_buffer/service/buffer_manager.h" | 10 #include "gpu/command_buffer/service/buffer_manager.h" |
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 static const GLenum kUniform3Type = GL_FLOAT_VEC3; | 577 static const GLenum kUniform3Type = GL_FLOAT_VEC3; |
578 static const GLenum kUniform4Type = GL_UNSIGNED_INT; | 578 static const GLenum kUniform4Type = GL_UNSIGNED_INT; |
579 static const GLenum kUniform5Type = GL_UNSIGNED_INT_VEC2; | 579 static const GLenum kUniform5Type = GL_UNSIGNED_INT_VEC2; |
580 static const GLenum kUniform6Type = GL_UNSIGNED_INT_VEC3; | 580 static const GLenum kUniform6Type = GL_UNSIGNED_INT_VEC3; |
581 static const GLenum kUniform7Type = GL_UNSIGNED_INT_VEC4; | 581 static const GLenum kUniform7Type = GL_UNSIGNED_INT_VEC4; |
582 static const GLenum kUniformSamplerExternalType = GL_SAMPLER_EXTERNAL_OES; | 582 static const GLenum kUniformSamplerExternalType = GL_SAMPLER_EXTERNAL_OES; |
583 static const GLenum kUniformCubemapType = GL_SAMPLER_CUBE; | 583 static const GLenum kUniformCubemapType = GL_SAMPLER_CUBE; |
584 static const GLint kInvalidUniformLocation = 30; | 584 static const GLint kInvalidUniformLocation = 30; |
585 static const GLint kBadUniformIndex = 1000; | 585 static const GLint kBadUniformIndex = 1000; |
586 | 586 |
| 587 static const GLint kOutputVariable1Size = 0; |
| 588 static const GLenum kOutputVariable1Type = GL_FLOAT_VEC4; |
| 589 static const GLuint kOutputVariable1ColorName = 7; |
| 590 static const GLuint kOutputVariable1Index = 0; |
| 591 static const char* kOutputVariable1Name; |
| 592 static const char* kOutputVariable1NameESSL3; |
| 593 |
587 // Use StrictMock to make 100% sure we know how GL will be called. | 594 // Use StrictMock to make 100% sure we know how GL will be called. |
588 scoped_ptr< ::testing::StrictMock< ::gfx::MockGLInterface> > gl_; | 595 scoped_ptr< ::testing::StrictMock< ::gfx::MockGLInterface> > gl_; |
589 scoped_refptr<gfx::GLSurfaceStub> surface_; | 596 scoped_refptr<gfx::GLSurfaceStub> surface_; |
590 scoped_refptr<GLContextMock> context_; | 597 scoped_refptr<GLContextMock> context_; |
591 scoped_ptr<MockGLES2Decoder> mock_decoder_; | 598 scoped_ptr<MockGLES2Decoder> mock_decoder_; |
592 scoped_ptr<GLES2Decoder> decoder_; | 599 scoped_ptr<GLES2Decoder> decoder_; |
593 MemoryTracker* memory_tracker_; | 600 MemoryTracker* memory_tracker_; |
594 | 601 |
595 GLuint client_buffer_id_; | 602 GLuint client_buffer_id_; |
596 GLuint client_framebuffer_id_; | 603 GLuint client_framebuffer_id_; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 bool cached_dither; | 642 bool cached_dither; |
636 bool cached_polygon_offset_fill; | 643 bool cached_polygon_offset_fill; |
637 bool cached_sample_alpha_to_coverage; | 644 bool cached_sample_alpha_to_coverage; |
638 bool cached_sample_coverage; | 645 bool cached_sample_coverage; |
639 bool cached_scissor_test; | 646 bool cached_scissor_test; |
640 bool cached_stencil_test; | 647 bool cached_stencil_test; |
641 }; | 648 }; |
642 | 649 |
643 EnableFlags enable_flags_; | 650 EnableFlags enable_flags_; |
644 | 651 |
| 652 int shader_language_version_; |
| 653 |
645 private: | 654 private: |
646 class MockCommandBufferEngine : public CommandBufferEngine { | 655 class MockCommandBufferEngine : public CommandBufferEngine { |
647 public: | 656 public: |
648 MockCommandBufferEngine(); | 657 MockCommandBufferEngine(); |
649 | 658 |
650 ~MockCommandBufferEngine() override; | 659 ~MockCommandBufferEngine() override; |
651 | 660 |
652 scoped_refptr<gpu::Buffer> GetSharedMemoryBuffer(int32 shm_id) override; | 661 scoped_refptr<gpu::Buffer> GetSharedMemoryBuffer(int32 shm_id) override; |
653 | 662 |
654 void ClearSharedMemory() { | 663 void ClearSharedMemory() { |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 }; | 734 }; |
726 | 735 |
727 // SpecializedSetup specializations that are needed in multiple unittest files. | 736 // SpecializedSetup specializations that are needed in multiple unittest files. |
728 template <> | 737 template <> |
729 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid); | 738 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid); |
730 | 739 |
731 } // namespace gles2 | 740 } // namespace gles2 |
732 } // namespace gpu | 741 } // namespace gpu |
733 | 742 |
734 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 743 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
OLD | NEW |