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

Side by Side Diff: gpu/command_buffer/tests/gl_map_buffer_range_unittest.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <GLES2/gl2.h> 5 #include <GLES2/gl2.h>
6 #include <GLES2/gl2ext.h> 6 #include <GLES2/gl2ext.h>
7 #include <GLES2/gl2extchromium.h> 7 #include <GLES2/gl2extchromium.h>
8 #include <GLES3/gl3.h> 8 #include <GLES3/gl3.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 12 matching lines...) Expand all
23 class ES3MapBufferRangeTest : public testing::Test { 23 class ES3MapBufferRangeTest : public testing::Test {
24 protected: 24 protected:
25 static const GLsizei kCanvasSize = 4; 25 static const GLsizei kCanvasSize = 4;
26 26
27 void SetUp() override { 27 void SetUp() override {
28 GLManager::Options options; 28 GLManager::Options options;
29 options.size = gfx::Size(kCanvasSize, kCanvasSize); 29 options.size = gfx::Size(kCanvasSize, kCanvasSize);
30 options.context_type = gles2::CONTEXT_TYPE_OPENGLES3; 30 options.context_type = gles2::CONTEXT_TYPE_OPENGLES3;
31 31
32 base::CommandLine cmd_line(base::CommandLine::NO_PROGRAM); 32 base::CommandLine cmd_line(base::CommandLine::NO_PROGRAM);
33 cmd_line.AppendSwitch(switches::kEnableUnsafeES3APIs);
34 gl_.InitializeWithCommandLine(options, cmd_line); 33 gl_.InitializeWithCommandLine(options, cmd_line);
35 } 34 }
36 35
37 bool ShouldSkipTest() const { 36 bool ShouldSkipTest() const {
38 // If a driver isn't capable of supporting ES3 context, creating 37 // If a driver isn't capable of supporting ES3 context, creating
39 // ContextGroup will fail. 38 // ContextGroup will fail.
40 // See crbug.com/654709. 39 // See crbug.com/654709.
41 return (!gl_.decoder() || !gl_.decoder()->GetContextGroup()); 40 return (!gl_.decoder() || !gl_.decoder()->GetContextGroup());
42 } 41 }
43 42
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 471
473 glUnmapBuffer(GL_TRANSFORM_FEEDBACK_BUFFER); 472 glUnmapBuffer(GL_TRANSFORM_FEEDBACK_BUFFER);
474 GLTestHelper::CheckGLError("no errors", __LINE__); 473 GLTestHelper::CheckGLError("no errors", __LINE__);
475 } 474 }
476 475
477 // TODO(zmo): add tests for uniform buffer mapping. 476 // TODO(zmo): add tests for uniform buffer mapping.
478 477
479 // TODO(zmo): add tests for CopyBufferSubData case. 478 // TODO(zmo): add tests for CopyBufferSubData case.
480 479
481 } // namespace gpu 480 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698