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

Unified Diff: gpu/command_buffer/tests/gl_unittest.cc

Issue 1871613002: 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/tests/gl_unittest.cc
diff --git a/gpu/command_buffer/tests/gl_unittest.cc b/gpu/command_buffer/tests/gl_unittest.cc
index b7fcad69558712793a8c85613d5db4dce2265300..2d7fec273c9fd7866625346663e2da2710c9b268 100644
--- a/gpu/command_buffer/tests/gl_unittest.cc
+++ b/gpu/command_buffer/tests/gl_unittest.cc
@@ -16,10 +16,14 @@ namespace gpu {
class GLTest : public testing::Test {
protected:
- void SetUp() override { gl_.Initialize(GLManager::Options()); }
+ void SetUp() override {
+ GpuDriverBugWorkarounds::Initialize(gpu_driver_bug_workarounds_);
+ gl_.Initialize(GLManager::Options());
+ }
void TearDown() override { gl_.Destroy(); }
+ GpuDriverBugWorkarounds gpu_driver_bug_workarounds_;
GLManager gl_;
};
@@ -99,7 +103,8 @@ TEST_F(GLTest, SimpleShader) {
}
TEST_F(GLTest, FeatureFlagsMatchCapabilities) {
- scoped_refptr<gles2::FeatureInfo> features = new gles2::FeatureInfo;
+ scoped_refptr<gles2::FeatureInfo> features =
+ new gles2::FeatureInfo(gpu_driver_bug_workarounds_);
EXPECT_TRUE(features->InitializeForTesting());
const auto& caps = gl_.GetCapabilities();
const auto& flags = features->feature_flags();

Powered by Google App Engine
This is Rietveld 408576698