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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_extensions.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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 void SetUp() override { 188 void SetUp() override {
189 InitState init; 189 InitState init;
190 init.gl_version = "opengl es 3.1"; 190 init.gl_version = "opengl es 3.1";
191 init.has_alpha = true; 191 init.has_alpha = true;
192 init.has_depth = true; 192 init.has_depth = true;
193 init.request_alpha = true; 193 init.request_alpha = true;
194 init.request_depth = true; 194 init.request_depth = true;
195 init.bind_generates_resource = true; 195 init.bind_generates_resource = true;
196 init.extensions = "GL_NV_path_rendering GL_NV_framebuffer_mixed_samples"; 196 init.extensions = "GL_NV_path_rendering GL_NV_framebuffer_mixed_samples";
197 base::CommandLine command_line(0, NULL); 197 InitDecoder(init);
198 command_line.AppendSwitch(switches::kEnableGLPathRendering);
199 InitDecoderWithCommandLine(init, &command_line);
200 198
201 EXPECT_CALL(*gl_, GenPathsNV(1)) 199 EXPECT_CALL(*gl_, GenPathsNV(1))
202 .WillOnce(Return(kServicePathId)) 200 .WillOnce(Return(kServicePathId))
203 .RetiresOnSaturation(); 201 .RetiresOnSaturation();
204 cmds::GenPathsCHROMIUM cmd; 202 cmds::GenPathsCHROMIUM cmd;
205 cmd.Init(client_path_id_, 1); 203 cmd.Init(client_path_id_, 1);
206 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 204 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
207 205
208 // The tests use client_path_id_ to test all sorts of drawing. The NVPR API 206 // The tests use client_path_id_ to test all sorts of drawing. The NVPR API
209 // behaves differently with a path name that is "used" but not which does 207 // behaves differently with a path name that is "used" but not which does
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 GLES2DecoderTestWithCHROMIUMFramebufferMixedSamples() {} 546 GLES2DecoderTestWithCHROMIUMFramebufferMixedSamples() {}
549 void SetUp() override { 547 void SetUp() override {
550 InitState init; 548 InitState init;
551 init.gl_version = "opengl es 3.1"; 549 init.gl_version = "opengl es 3.1";
552 init.has_alpha = true; 550 init.has_alpha = true;
553 init.has_depth = true; 551 init.has_depth = true;
554 init.request_alpha = true; 552 init.request_alpha = true;
555 init.request_depth = true; 553 init.request_depth = true;
556 init.bind_generates_resource = true; 554 init.bind_generates_resource = true;
557 init.extensions = "GL_NV_path_rendering GL_NV_framebuffer_mixed_samples "; 555 init.extensions = "GL_NV_path_rendering GL_NV_framebuffer_mixed_samples ";
558 base::CommandLine command_line(0, NULL); 556 InitDecoder(init);
559 command_line.AppendSwitch(switches::kEnableGLPathRendering);
560 InitDecoderWithCommandLine(init, &command_line);
561 } 557 }
562 }; 558 };
563 559
564 INSTANTIATE_TEST_CASE_P(Service, 560 INSTANTIATE_TEST_CASE_P(Service,
565 GLES2DecoderTestWithCHROMIUMFramebufferMixedSamples, 561 GLES2DecoderTestWithCHROMIUMFramebufferMixedSamples,
566 ::testing::Bool()); 562 ::testing::Bool());
567 563
568 TEST_P(GLES2DecoderTestWithCHROMIUMPathRendering, GenDeletePaths) { 564 TEST_P(GLES2DecoderTestWithCHROMIUMPathRendering, GenDeletePaths) {
569 static GLuint kFirstClientID = client_path_id_ + 88; 565 static GLuint kFirstClientID = client_path_id_ + 88;
570 static GLsizei kPathCount = 58; 566 static GLsizei kPathCount = 58;
(...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1725 SetBucketAsCString(kBucketId, kBadName1); 1721 SetBucketAsCString(kBucketId, kBadName1);
1726 cmd.Init(client_program_id_, kLocation, kBucketId); 1722 cmd.Init(client_program_id_, kLocation, kBucketId);
1727 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1723 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1728 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); 1724 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
1729 } 1725 }
1730 1726
1731 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_extensions_autog en.h" 1727 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_extensions_autog en.h"
1732 1728
1733 } // namespace gles2 1729 } // namespace gles2
1734 } // namespace gpu 1730 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info_unittest.cc ('k') | gpu/command_buffer/service/gpu_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698