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

Side by Side Diff: gpu/command_buffer/tests/es3_misc_functions_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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "gpu/command_buffer/tests/gl_manager.h" 12 #include "gpu/command_buffer/tests/gl_manager.h"
13 #include "gpu/command_buffer/tests/gl_test_utils.h" 13 #include "gpu/command_buffer/tests/gl_test_utils.h"
14 #include "testing/gmock/include/gmock/gmock.h" 14 #include "testing/gmock/include/gmock/gmock.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 #include "ui/gl/gl_switches.h" 16 #include "ui/gl/gl_switches.h"
17 17
18 #define SHADER_VERSION_300(Src) "#version 300 es\n" #Src 18 #define SHADER_VERSION_300(Src) "#version 300 es\n" #Src
19 19
20 namespace gpu { 20 namespace gpu {
21 21
22 class OpenGLES3FunctionTest : public testing::Test { 22 class OpenGLES3FunctionTest : public testing::Test {
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 = gles2::CONTEXT_TYPE_OPENGLES3; 28 options.context_type = gles2::CONTEXT_TYPE_OPENGLES3;
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 #if defined(OS_ANDROID) 36 #if defined(OS_ANDROID)
37 // Test is failing for Lollipop 64 bit Tester. 37 // Test is failing for Lollipop 64 bit Tester.
38 // See crbug/550292. 38 // See crbug/550292.
39 #define MAYBE_GetFragDataLocationInvalid DISABLED_GetFragDataLocationInvalid 39 #define MAYBE_GetFragDataLocationInvalid DISABLED_GetFragDataLocationInvalid
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 extensions.end()); 104 extensions.end());
105 std::set<std::string> extensions_from_stringi; 105 std::set<std::string> extensions_from_stringi;
106 for (int i = 0; i < num_extensions; ++i) { 106 for (int i = 0; i < num_extensions; ++i) {
107 extensions_from_stringi.insert( 107 extensions_from_stringi.insert(
108 reinterpret_cast<const char*>(glGetStringi(GL_EXTENSIONS, i))); 108 reinterpret_cast<const char*>(glGetStringi(GL_EXTENSIONS, i)));
109 } 109 }
110 EXPECT_EQ(extensions_from_string, extensions_from_stringi); 110 EXPECT_EQ(extensions_from_string, extensions_from_stringi);
111 } 111 }
112 112
113 } // namespace gpu 113 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/texture_manager_unittest.cc ('k') | gpu/command_buffer/tests/gl_clear_framebuffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698