| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| 6 | 6 |
| 7 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 7 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
| 8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 9 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest.h" | 9 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 #include "ui/gl/gl_mock.h" | 11 #include "ui/gl/gl_mock.h" |
| 12 | 12 |
| 13 using ::gfx::MockGLInterface; | 13 using ::gfx::MockGLInterface; |
| 14 using ::testing::_; | 14 using ::testing::_; |
| 15 | 15 |
| 16 namespace gpu { | 16 namespace gpu { |
| 17 namespace gles2 { | 17 namespace gles2 { |
| 18 | 18 |
| 19 class GLES2DecoderTestWithCHROMIUMPathRendering : public GLES2DecoderTest { | 19 class GLES2DecoderTestWithCHROMIUMPathRendering : public GLES2DecoderTest { |
| 20 public: | 20 public: |
| 21 GLES2DecoderTestWithCHROMIUMPathRendering() {} | 21 GLES2DecoderTestWithCHROMIUMPathRendering() {} |
| 22 virtual void SetUp() override { | 22 void SetUp() override { |
| 23 InitState init; | 23 InitState init; |
| 24 init.gl_version = "opengl es 3.1"; | 24 init.gl_version = "opengl es 3.1"; |
| 25 init.has_alpha = true; | 25 init.has_alpha = true; |
| 26 init.has_depth = true; | 26 init.has_depth = true; |
| 27 init.request_alpha = true; | 27 init.request_alpha = true; |
| 28 init.request_depth = true; | 28 init.request_depth = true; |
| 29 init.bind_generates_resource = true; | 29 init.bind_generates_resource = true; |
| 30 init.extensions = "GL_NV_path_rendering"; | 30 init.extensions = "GL_NV_path_rendering"; |
| 31 InitDecoder(init); | 31 InitDecoder(init); |
| 32 } | 32 } |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 INSTANTIATE_TEST_CASE_P(Service, | 35 INSTANTIATE_TEST_CASE_P(Service, |
| 36 GLES2DecoderTestWithCHROMIUMPathRendering, | 36 GLES2DecoderTestWithCHROMIUMPathRendering, |
| 37 ::testing::Bool()); | 37 ::testing::Bool()); |
| 38 | 38 |
| 39 class GLES2DecoderTestWithBlendEquationAdvanced : public GLES2DecoderTest { | 39 class GLES2DecoderTestWithBlendEquationAdvanced : public GLES2DecoderTest { |
| 40 public: | 40 public: |
| 41 GLES2DecoderTestWithBlendEquationAdvanced() {} | 41 GLES2DecoderTestWithBlendEquationAdvanced() {} |
| 42 virtual void SetUp() override { | 42 void SetUp() override { |
| 43 InitState init; | 43 InitState init; |
| 44 init.gl_version = "opengl es 2.0"; | 44 init.gl_version = "opengl es 2.0"; |
| 45 init.has_alpha = true; | 45 init.has_alpha = true; |
| 46 init.has_depth = true; | 46 init.has_depth = true; |
| 47 init.request_alpha = true; | 47 init.request_alpha = true; |
| 48 init.request_depth = true; | 48 init.request_depth = true; |
| 49 init.bind_generates_resource = true; | 49 init.bind_generates_resource = true; |
| 50 init.extensions = "GL_KHR_blend_equation_advanced"; | 50 init.extensions = "GL_KHR_blend_equation_advanced"; |
| 51 InitDecoder(init); | 51 InitDecoder(init); |
| 52 } | 52 } |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 INSTANTIATE_TEST_CASE_P(Service, | 55 INSTANTIATE_TEST_CASE_P(Service, |
| 56 GLES2DecoderTestWithBlendEquationAdvanced, | 56 GLES2DecoderTestWithBlendEquationAdvanced, |
| 57 ::testing::Bool()); | 57 ::testing::Bool()); |
| 58 | 58 |
| 59 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_extensions_autog
en.h" | 59 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_extensions_autog
en.h" |
| 60 | 60 |
| 61 } // namespace gles2 | 61 } // namespace gles2 |
| 62 } // namespace gpu | 62 } // namespace gpu |
| 63 | 63 |
| OLD | NEW |