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

Side by Side Diff: ui/gl/test/gl_surface_test_support.cc

Issue 2543313002: ui/gl: rename ClearGLBindings to ShutdownGL (Closed)
Patch Set: Created 4 years 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 | « ui/gl/test/gl_image_test_support.cc ('k') | ui/ozone/common/gl_ozone_egl.h » ('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 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 "ui/gl/test/gl_surface_test_support.h" 5 #include "ui/gl/test/gl_surface_test_support.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 // static 70 // static
71 void GLSurfaceTestSupport::InitializeOneOffImplementation( 71 void GLSurfaceTestSupport::InitializeOneOffImplementation(
72 GLImplementation impl, 72 GLImplementation impl,
73 bool fallback_to_osmesa) { 73 bool fallback_to_osmesa) {
74 DCHECK(!base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseGL)) 74 DCHECK(!base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseGL))
75 << "kUseGL has not effect in tests"; 75 << "kUseGL has not effect in tests";
76 76
77 // This method may be called multiple times in the same process to set up 77 // This method may be called multiple times in the same process to set up
78 // bindings in different ways. 78 // bindings in different ways.
79 init::ClearGLBindings(); 79 init::ShutdownGL();
80 80
81 bool gpu_service_logging = false; 81 bool gpu_service_logging = false;
82 bool disable_gl_drawing = false; 82 bool disable_gl_drawing = false;
83 83
84 CHECK(init::InitializeGLOneOffImplementation( 84 CHECK(init::InitializeGLOneOffImplementation(
85 impl, fallback_to_osmesa, gpu_service_logging, disable_gl_drawing)); 85 impl, fallback_to_osmesa, gpu_service_logging, disable_gl_drawing));
86 } 86 }
87 87
88 // static 88 // static
89 void GLSurfaceTestSupport::InitializeOneOffWithMockBindings() { 89 void GLSurfaceTestSupport::InitializeOneOffWithMockBindings() {
90 #if defined(USE_OZONE) 90 #if defined(USE_OZONE)
91 // This function skips where Ozone is otherwise initialized. 91 // This function skips where Ozone is otherwise initialized.
92 ui::OzonePlatform::InitializeForGPU(); 92 ui::OzonePlatform::InitializeForGPU();
93 #endif 93 #endif
94 InitializeOneOffImplementation(kGLImplementationMockGL, false); 94 InitializeOneOffImplementation(kGLImplementationMockGL, false);
95 } 95 }
96 96
97 } // namespace gl 97 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/test/gl_image_test_support.cc ('k') | ui/ozone/common/gl_ozone_egl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698