OLD | NEW |
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 Loading... |
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 info_ = new FeatureInfo(command_line); | 104 GpuDriverBugWorkarounds gpu_driver_bug_workaround(&command_line); |
| 105 info_ = new FeatureInfo(command_line, gpu_driver_bug_workaround); |
105 info_->InitializeForTesting(); | 106 info_->InitializeForTesting(); |
106 } | 107 } |
107 | 108 |
108 void SetupWithCommandLine(const base::CommandLine& command_line) { | 109 void SetupWithCommandLine(const base::CommandLine& command_line) { |
109 GpuServiceTest::SetUp(); | 110 GpuServiceTest::SetUp(); |
110 info_ = new FeatureInfo(command_line); | 111 GpuDriverBugWorkarounds gpu_driver_bug_workaround(&command_line); |
| 112 info_ = new FeatureInfo(command_line, gpu_driver_bug_workaround); |
111 } | 113 } |
112 | 114 |
113 void SetupInitExpectationsWithCommandLine( | 115 void SetupInitExpectationsWithCommandLine( |
114 const char* extensions, | 116 const char* extensions, |
115 const base::CommandLine& command_line) { | 117 const base::CommandLine& command_line) { |
116 GpuServiceTest::SetUpWithGLVersion("2.0", extensions); | 118 GpuServiceTest::SetUpWithGLVersion("2.0", extensions); |
117 TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( | 119 TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( |
118 gl_.get(), extensions, "", ""); | 120 gl_.get(), extensions, "", ""); |
119 info_ = new FeatureInfo(command_line); | 121 GpuDriverBugWorkarounds gpu_driver_bug_workaround(&command_line); |
| 122 info_ = new FeatureInfo(command_line, gpu_driver_bug_workaround); |
120 info_->InitializeForTesting(); | 123 info_->InitializeForTesting(); |
121 } | 124 } |
122 | 125 |
123 void SetupWithoutInit() { | 126 void SetupWithoutInit() { |
124 GpuServiceTest::SetUp(); | 127 GpuServiceTest::SetUp(); |
125 info_ = new FeatureInfo(); | 128 info_ = new FeatureInfo(); |
126 } | 129 } |
127 | 130 |
128 protected: | 131 protected: |
129 void SetUp() override { | 132 void SetUp() override { |
(...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1405 EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid(GL_RG8_EXT)); | 1408 EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid(GL_RG8_EXT)); |
1406 } | 1409 } |
1407 | 1410 |
1408 TEST_P(FeatureInfoTest, InitializeCHROMIUM_ycbcr_422_imageTrue) { | 1411 TEST_P(FeatureInfoTest, InitializeCHROMIUM_ycbcr_422_imageTrue) { |
1409 SetupInitExpectations("GL_APPLE_ycbcr_422"); | 1412 SetupInitExpectations("GL_APPLE_ycbcr_422"); |
1410 EXPECT_TRUE(info_->feature_flags().chromium_image_ycbcr_422); | 1413 EXPECT_TRUE(info_->feature_flags().chromium_image_ycbcr_422); |
1411 } | 1414 } |
1412 | 1415 |
1413 } // namespace gles2 | 1416 } // namespace gles2 |
1414 } // namespace gpu | 1417 } // namespace gpu |
OLD | NEW |