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

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

Issue 1892483004: Revert of Compute GpuDriverBugWorkarounds only one time in the GPU process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 (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 "gpu/command_buffer/service/feature_info.h" 5 #include "gpu/command_buffer/service/feature_info.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 95
96 void SetupInitExpectationsWithGLVersionAndCommandLine( 96 void SetupInitExpectationsWithGLVersionAndCommandLine(
97 const char* extensions, 97 const char* extensions,
98 const char* renderer, 98 const char* renderer,
99 const char* version, 99 const char* version,
100 const base::CommandLine& command_line) { 100 const base::CommandLine& command_line) {
101 GpuServiceTest::SetUpWithGLVersion(version, extensions); 101 GpuServiceTest::SetUpWithGLVersion(version, extensions);
102 TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( 102 TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
103 gl_.get(), extensions, renderer, version); 103 gl_.get(), extensions, renderer, version);
104 GpuDriverBugWorkarounds gpu_driver_bug_workaround(&command_line); 104 info_ = new FeatureInfo(command_line);
105 info_ = new FeatureInfo(command_line, gpu_driver_bug_workaround);
106 info_->InitializeForTesting(); 105 info_->InitializeForTesting();
107 } 106 }
108 107
109 void SetupWithCommandLine(const base::CommandLine& command_line) { 108 void SetupWithCommandLine(const base::CommandLine& command_line) {
110 GpuServiceTest::SetUp(); 109 GpuServiceTest::SetUp();
111 GpuDriverBugWorkarounds gpu_driver_bug_workaround(&command_line); 110 info_ = new FeatureInfo(command_line);
112 info_ = new FeatureInfo(command_line, gpu_driver_bug_workaround);
113 } 111 }
114 112
115 void SetupInitExpectationsWithCommandLine( 113 void SetupInitExpectationsWithCommandLine(
116 const char* extensions, 114 const char* extensions,
117 const base::CommandLine& command_line) { 115 const base::CommandLine& command_line) {
118 GpuServiceTest::SetUpWithGLVersion("2.0", extensions); 116 GpuServiceTest::SetUpWithGLVersion("2.0", extensions);
119 TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( 117 TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
120 gl_.get(), extensions, "", ""); 118 gl_.get(), extensions, "", "");
121 GpuDriverBugWorkarounds gpu_driver_bug_workaround(&command_line); 119 info_ = new FeatureInfo(command_line);
122 info_ = new FeatureInfo(command_line, gpu_driver_bug_workaround);
123 info_->InitializeForTesting(); 120 info_->InitializeForTesting();
124 } 121 }
125 122
126 void SetupWithoutInit() { 123 void SetupWithoutInit() {
127 GpuServiceTest::SetUp(); 124 GpuServiceTest::SetUp();
128 info_ = new FeatureInfo(); 125 info_ = new FeatureInfo();
129 } 126 }
130 127
131 protected: 128 protected:
132 void SetUp() override { 129 void SetUp() override {
(...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1408 EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid(GL_RG8_EXT)); 1405 EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid(GL_RG8_EXT));
1409 } 1406 }
1410 1407
1411 TEST_P(FeatureInfoTest, InitializeCHROMIUM_ycbcr_422_imageTrue) { 1408 TEST_P(FeatureInfoTest, InitializeCHROMIUM_ycbcr_422_imageTrue) {
1412 SetupInitExpectations("GL_APPLE_ycbcr_422"); 1409 SetupInitExpectations("GL_APPLE_ycbcr_422");
1413 EXPECT_TRUE(info_->feature_flags().chromium_image_ycbcr_422); 1410 EXPECT_TRUE(info_->feature_flags().chromium_image_ycbcr_422);
1414 } 1411 }
1415 1412
1416 } // namespace gles2 1413 } // namespace gles2
1417 } // namespace gpu 1414 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698