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

Side by Side Diff: gpu/command_buffer/tests/gl_request_extension_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: Rebase 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
« no previous file with comments | « gpu/command_buffer/tests/gl_manager.cc ('k') | gpu/command_buffer/tests/gl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <GLES3/gl3.h> 8 #include <GLES3/gl3.h>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/strings/string_split.h" 11 #include "base/strings/string_split.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "gpu/command_buffer/tests/gl_manager.h" 13 #include "gpu/command_buffer/tests/gl_manager.h"
14 #include "gpu/command_buffer/tests/gl_test_utils.h" 14 #include "gpu/command_buffer/tests/gl_test_utils.h"
15 #include "testing/gmock/include/gmock/gmock.h" 15 #include "testing/gmock/include/gmock/gmock.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 #include "ui/gl/gl_switches.h" 17 #include "ui/gl/gl_switches.h"
18 18
19 namespace gpu { 19 namespace gpu {
20 20
21 class RequestExtensionCHROMIUMTest 21 class RequestExtensionCHROMIUMTest
22 : public testing::TestWithParam<gles2::ContextType> { 22 : public testing::TestWithParam<gles2::ContextType> {
23 protected: 23 protected:
24 void SetUp() override { 24 void SetUp() override {
25 base::CommandLine command_line(*base::CommandLine::ForCurrentProcess()); 25 base::CommandLine command_line(*base::CommandLine::ForCurrentProcess());
26 command_line.AppendSwitch(switches::kEnableUnsafeES3APIs); 26 command_line.AppendSwitch(switches::kEnableUnsafeES3APIs);
27 GLManager::Options options; 27 GLManager::Options options;
28 options.context_type = GetParam(); 28 options.context_type = GetParam();
29 gl_.InitializeWithCommandLine(options, &command_line); 29 gl_.InitializeWithCommandLine(options, command_line);
30 } 30 }
31 void TearDown() override { gl_.Destroy(); } 31 void TearDown() override { gl_.Destroy(); }
32 bool IsApplicable() const { return gl_.IsInitialized(); } 32 bool IsApplicable() const { return gl_.IsInitialized(); }
33 GLManager gl_; 33 GLManager gl_;
34 }; 34 };
35 35
36 TEST_P(RequestExtensionCHROMIUMTest, Basic) { 36 TEST_P(RequestExtensionCHROMIUMTest, Basic) {
37 if (!IsApplicable()) { 37 if (!IsApplicable()) {
38 return; 38 return;
39 } 39 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 EXPECT_GE(extensions.size(), extensions_size_before_request); 96 EXPECT_GE(extensions.size(), extensions_size_before_request);
97 } 97 }
98 } 98 }
99 INSTANTIATE_TEST_CASE_P(WithContextTypes, 99 INSTANTIATE_TEST_CASE_P(WithContextTypes,
100 RequestExtensionCHROMIUMTest, 100 RequestExtensionCHROMIUMTest,
101 ::testing::Values(gles2::CONTEXT_TYPE_WEBGL1, 101 ::testing::Values(gles2::CONTEXT_TYPE_WEBGL1,
102 gles2::CONTEXT_TYPE_WEBGL2, 102 gles2::CONTEXT_TYPE_WEBGL2,
103 gles2::CONTEXT_TYPE_OPENGLES2, 103 gles2::CONTEXT_TYPE_OPENGLES2,
104 gles2::CONTEXT_TYPE_OPENGLES3)); 104 gles2::CONTEXT_TYPE_OPENGLES3));
105 } 105 }
OLDNEW
« no previous file with comments | « gpu/command_buffer/tests/gl_manager.cc ('k') | gpu/command_buffer/tests/gl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698