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

Side by Side Diff: gpu/command_buffer/tests/gl_chromium_path_rendering_unittest.cc

Issue 1626363002: command_buffer: Enable gl path rendering by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 10 months 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
« no previous file with comments | « gpu/command_buffer/tests/gl_chromium_framebuffer_mixed_samples_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <cmath> 10 #include <cmath>
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 } 32 }
33 namespace gpu { 33 namespace gpu {
34 34
35 class CHROMIUMPathRenderingTest : public testing::Test { 35 class CHROMIUMPathRenderingTest : public testing::Test {
36 protected: 36 protected:
37 static const GLsizei kResolution = 300; 37 static const GLsizei kResolution = 300;
38 38
39 void SetUp() override { 39 void SetUp() override {
40 GLManager::Options options; 40 GLManager::Options options;
41 base::CommandLine command_line(*base::CommandLine::ForCurrentProcess());
42 command_line.AppendSwitch(switches::kEnableGLPathRendering);
43 InitializeContextFeatures(&options); 41 InitializeContextFeatures(&options);
44 gl_.InitializeWithCommandLine(options, &command_line); 42 gl_.Initialize(options);
45 } 43 }
46 44
47 virtual void InitializeContextFeatures(GLManager::Options* options) { 45 virtual void InitializeContextFeatures(GLManager::Options* options) {
48 options->size = gfx::Size(kResolution, kResolution); 46 options->size = gfx::Size(kResolution, kResolution);
49 } 47 }
50 48
51 void TearDown() override { gl_.Destroy(); } 49 void TearDown() override { gl_.Destroy(); }
52 50
53 bool IsApplicable() const { 51 bool IsApplicable() const {
54 return GLTestHelper::HasExtension("GL_CHROMIUM_path_rendering"); 52 return GLTestHelper::HasExtension("GL_CHROMIUM_path_rendering");
(...skipping 1718 matching lines...) Expand 10 before | Expand all | Expand 10 after
1773 glProgramPathFragmentInputGenCHROMIUM(program, kUnboundLocation, 1771 glProgramPathFragmentInputGenCHROMIUM(program, kUnboundLocation,
1774 GL_CONSTANT_CHROMIUM, 4, kColor); 1772 GL_CONSTANT_CHROMIUM, 4, kColor);
1775 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_OPERATION), glGetError()); 1773 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_OPERATION), glGetError());
1776 } 1774 }
1777 1775
1778 INSTANTIATE_TEST_CASE_P(WithAndWithoutShaderNameMapping, 1776 INSTANTIATE_TEST_CASE_P(WithAndWithoutShaderNameMapping,
1779 CHROMIUMPathRenderingWithTexturingTest, 1777 CHROMIUMPathRenderingWithTexturingTest,
1780 ::testing::Bool()); 1778 ::testing::Bool());
1781 1779
1782 } // namespace gpu 1780 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/tests/gl_chromium_framebuffer_mixed_samples_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698