Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_3.cc

Issue 2445323006: command buffer: remove "unsafe" from autogenerated ES3 apis; cleanly separate ES3 tests (Closed)
Patch Set: address comment Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/command_line.h"
9 #include "gpu/command_buffer/common/gles2_cmd_format.h" 10 #include "gpu/command_buffer/common/gles2_cmd_format.h"
10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 11 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
11 #include "gpu/command_buffer/service/cmd_buffer_engine.h" 12 #include "gpu/command_buffer/service/cmd_buffer_engine.h"
12 #include "gpu/command_buffer/service/context_group.h" 13 #include "gpu/command_buffer/service/context_group.h"
13 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h" 14 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h"
14 #include "gpu/command_buffer/service/program_manager.h" 15 #include "gpu/command_buffer/service/program_manager.h"
15 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
16 #include "ui/gl/gl_mock.h" 17 #include "ui/gl/gl_mock.h"
17 18
18 using ::gl::MockGLInterface; 19 using ::gl::MockGLInterface;
(...skipping 10 matching lines...) Expand all
29 namespace gpu { 30 namespace gpu {
30 namespace gles2 { 31 namespace gles2 {
31 32
32 using namespace cmds; 33 using namespace cmds;
33 34
34 class GLES2DecoderTest3 : public GLES2DecoderTestBase { 35 class GLES2DecoderTest3 : public GLES2DecoderTestBase {
35 public: 36 public:
36 GLES2DecoderTest3() { } 37 GLES2DecoderTest3() { }
37 }; 38 };
38 39
40 class GLES3DecoderTest3 : public GLES2DecoderTest3 {
41 public:
42 GLES3DecoderTest3() { shader_language_version_ = 300; }
43 protected:
44 void SetUp() override {
45 base::CommandLine command_line(0, nullptr);
46 command_line.AppendSwitch(switches::kEnableUnsafeES3APIs);
47 InitState init;
48 init.gl_version = "OpenGL ES 3.0";
49 init.bind_generates_resource = true;
50 init.context_type = CONTEXT_TYPE_OPENGLES3;
51 InitDecoderWithCommandLine(init, &command_line);
52 }
53 };
54
39 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderTest3, ::testing::Bool()); 55 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderTest3, ::testing::Bool());
56 INSTANTIATE_TEST_CASE_P(Service, GLES3DecoderTest3, ::testing::Bool());
40 57
41 template <> 58 template <>
42 void GLES2DecoderTestBase::SpecializedSetup<UniformMatrix3fvImmediate, 0>( 59 void GLES2DecoderTestBase::SpecializedSetup<UniformMatrix3fvImmediate, 0>(
43 bool /* valid */) { 60 bool /* valid */) {
44 SetupShaderForUniform(GL_FLOAT_MAT3); 61 SetupShaderForUniform(GL_FLOAT_MAT3);
45 }; 62 };
46 63
47 template <> 64 template <>
48 void GLES2DecoderTestBase::SpecializedSetup<UniformMatrix4fvImmediate, 0>( 65 void GLES2DecoderTestBase::SpecializedSetup<UniformMatrix4fvImmediate, 0>(
49 bool /* valid */) { 66 bool /* valid */) {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 167
151 end_cmd.Init(); 168 end_cmd.Init();
152 EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd)); 169 EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd));
153 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 170 EXPECT_EQ(GL_NO_ERROR, GetGLError());
154 } 171 }
155 172
156 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h" 173 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h"
157 174
158 } // namespace gles2 175 } // namespace gles2
159 } // namespace gpu 176 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698