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

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

Issue 2444813002: Remove unsafe mode to enable es3 api by default for WebGL2 and ES3 context (Closed)
Patch Set: fix a bug 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 25 matching lines...) Expand all
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); 45 base::CommandLine command_line(0, nullptr);
46 command_line.AppendSwitch(switches::kEnableUnsafeES3APIs);
47 InitState init; 46 InitState init;
48 init.gl_version = "OpenGL ES 3.0"; 47 init.gl_version = "OpenGL ES 3.0";
49 init.bind_generates_resource = true; 48 init.bind_generates_resource = true;
50 init.context_type = CONTEXT_TYPE_OPENGLES3; 49 init.context_type = CONTEXT_TYPE_OPENGLES3;
51 InitDecoderWithCommandLine(init, &command_line); 50 InitDecoderWithCommandLine(init, &command_line);
52 } 51 }
53 }; 52 };
54 53
55 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderTest3, ::testing::Bool()); 54 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderTest3, ::testing::Bool());
56 INSTANTIATE_TEST_CASE_P(Service, GLES3DecoderTest3, ::testing::Bool()); 55 INSTANTIATE_TEST_CASE_P(Service, GLES3DecoderTest3, ::testing::Bool());
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 166
168 end_cmd.Init(); 167 end_cmd.Init();
169 EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd)); 168 EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd));
170 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 169 EXPECT_EQ(GL_NO_ERROR, GetGLError());
171 } 170 }
172 171
173 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h" 172 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h"
174 173
175 } // namespace gles2 174 } // namespace gles2
176 } // namespace gpu 175 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698