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

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

Issue 2471853002: remove 'unsafe' from ES3 apis in gpu process (Closed)
Patch Set: forgot to save file 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 "base/command_line.h"
10 #include "gpu/command_buffer/common/gles2_cmd_format.h" 10 #include "gpu/command_buffer/common/gles2_cmd_format.h"
(...skipping 24 matching lines...) Expand all
35 class GLES2DecoderTest3 : public GLES2DecoderTestBase { 35 class GLES2DecoderTest3 : public GLES2DecoderTestBase {
36 public: 36 public:
37 GLES2DecoderTest3() { } 37 GLES2DecoderTest3() { }
38 }; 38 };
39 39
40 class GLES3DecoderTest3 : public GLES2DecoderTest3 { 40 class GLES3DecoderTest3 : public GLES2DecoderTest3 {
41 public: 41 public:
42 GLES3DecoderTest3() { shader_language_version_ = 300; } 42 GLES3DecoderTest3() { shader_language_version_ = 300; }
43 protected: 43 protected:
44 void SetUp() override { 44 void SetUp() override {
45 base::CommandLine command_line(0, nullptr);
46 command_line.AppendSwitch(switches::kEnableUnsafeES3APIs);
47 InitState init; 45 InitState init;
48 init.gl_version = "OpenGL ES 3.0"; 46 init.gl_version = "OpenGL ES 3.0";
49 init.bind_generates_resource = true; 47 init.bind_generates_resource = true;
50 init.context_type = CONTEXT_TYPE_OPENGLES3; 48 init.context_type = CONTEXT_TYPE_OPENGLES3;
51 InitDecoderWithCommandLine(init, &command_line); 49 InitDecoder(init);
52 } 50 }
53 }; 51 };
54 52
55 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderTest3, ::testing::Bool()); 53 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderTest3, ::testing::Bool());
56 INSTANTIATE_TEST_CASE_P(Service, GLES3DecoderTest3, ::testing::Bool()); 54 INSTANTIATE_TEST_CASE_P(Service, GLES3DecoderTest3, ::testing::Bool());
57 55
58 template <> 56 template <>
59 void GLES2DecoderTestBase::SpecializedSetup<UniformMatrix3fvImmediate, 0>( 57 void GLES2DecoderTestBase::SpecializedSetup<UniformMatrix3fvImmediate, 0>(
60 bool /* valid */) { 58 bool /* valid */) {
61 SetupShaderForUniform(GL_FLOAT_MAT3); 59 SetupShaderForUniform(GL_FLOAT_MAT3);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 165
168 end_cmd.Init(); 166 end_cmd.Init();
169 EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd)); 167 EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd));
170 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 168 EXPECT_EQ(GL_NO_ERROR, GetGLError());
171 } 169 }
172 170
173 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h" 171 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h"
174 172
175 } // namespace gles2 173 } // namespace gles2
176 } // namespace gpu 174 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698