| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "gpu/command_buffer/service/gpu_preferences.h" | 21 #include "gpu/command_buffer/service/gpu_preferences.h" |
| 22 #include "gpu/command_buffer/service/program_manager.h" | 22 #include "gpu/command_buffer/service/program_manager.h" |
| 23 #include "gpu/command_buffer/service/query_manager.h" | 23 #include "gpu/command_buffer/service/query_manager.h" |
| 24 #include "gpu/command_buffer/service/renderbuffer_manager.h" | 24 #include "gpu/command_buffer/service/renderbuffer_manager.h" |
| 25 #include "gpu/command_buffer/service/sampler_manager.h" | 25 #include "gpu/command_buffer/service/sampler_manager.h" |
| 26 #include "gpu/command_buffer/service/shader_manager.h" | 26 #include "gpu/command_buffer/service/shader_manager.h" |
| 27 #include "gpu/command_buffer/service/test_helper.h" | 27 #include "gpu/command_buffer/service/test_helper.h" |
| 28 #include "gpu/command_buffer/service/texture_manager.h" | 28 #include "gpu/command_buffer/service/texture_manager.h" |
| 29 #include "gpu/command_buffer/service/valuebuffer_manager.h" | 29 #include "gpu/command_buffer/service/valuebuffer_manager.h" |
| 30 #include "gpu/command_buffer/service/vertex_array_manager.h" | 30 #include "gpu/command_buffer/service/vertex_array_manager.h" |
| 31 #include "gpu/config/gpu_driver_bug_workarounds.h" |
| 31 #include "testing/gtest/include/gtest/gtest.h" | 32 #include "testing/gtest/include/gtest/gtest.h" |
| 32 #include "ui/gl/gl_mock.h" | 33 #include "ui/gl/gl_mock.h" |
| 33 #include "ui/gl/gl_surface_stub.h" | 34 #include "ui/gl/gl_surface_stub.h" |
| 34 #include "ui/gl/gl_version_info.h" | 35 #include "ui/gl/gl_version_info.h" |
| 35 | 36 |
| 36 namespace base { | 37 namespace base { |
| 37 class CommandLine; | 38 class CommandLine; |
| 38 } | 39 } |
| 39 | 40 |
| 40 namespace gpu { | 41 namespace gpu { |
| (...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 GLuint bound_vertex_array_object_; | 750 GLuint bound_vertex_array_object_; |
| 750 }; // class MockGLStates | 751 }; // class MockGLStates |
| 751 | 752 |
| 752 void AddExpectationsForVertexAttribManager(); | 753 void AddExpectationsForVertexAttribManager(); |
| 753 void SetupMockGLBehaviors(); | 754 void SetupMockGLBehaviors(); |
| 754 | 755 |
| 755 void SetupInitStateManualExpectations(bool es3_capable); | 756 void SetupInitStateManualExpectations(bool es3_capable); |
| 756 | 757 |
| 757 scoped_ptr< ::testing::StrictMock<MockCommandBufferEngine> > engine_; | 758 scoped_ptr< ::testing::StrictMock<MockCommandBufferEngine> > engine_; |
| 758 GpuPreferences gpu_preferences_; | 759 GpuPreferences gpu_preferences_; |
| 760 GpuDriverBugWorkarounds gpu_driver_bug_workarounds_; |
| 759 scoped_refptr<ContextGroup> group_; | 761 scoped_refptr<ContextGroup> group_; |
| 760 MockGLStates gl_states_; | 762 MockGLStates gl_states_; |
| 761 base::MessageLoop message_loop_; | 763 base::MessageLoop message_loop_; |
| 762 }; | 764 }; |
| 763 | 765 |
| 764 class GLES2DecoderWithShaderTestBase : public GLES2DecoderTestBase { | 766 class GLES2DecoderWithShaderTestBase : public GLES2DecoderTestBase { |
| 765 public: | 767 public: |
| 766 GLES2DecoderWithShaderTestBase() | 768 GLES2DecoderWithShaderTestBase() |
| 767 : GLES2DecoderTestBase() { | 769 : GLES2DecoderTestBase() { |
| 768 } | 770 } |
| 769 | 771 |
| 770 protected: | 772 protected: |
| 771 void SetUp() override; | 773 void SetUp() override; |
| 772 void TearDown() override; | 774 void TearDown() override; |
| 773 }; | 775 }; |
| 774 | 776 |
| 775 // SpecializedSetup specializations that are needed in multiple unittest files. | 777 // SpecializedSetup specializations that are needed in multiple unittest files. |
| 776 template <> | 778 template <> |
| 777 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid); | 779 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid); |
| 778 | 780 |
| 779 } // namespace gles2 | 781 } // namespace gles2 |
| 780 } // namespace gpu | 782 } // namespace gpu |
| 781 | 783 |
| 782 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 784 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
| OLD | NEW |