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

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

Issue 2270463002: Add OzoneGLImpl interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undo initialization changes. Created 4 years, 3 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 "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"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 #include "ui/gl/gl_context.h" 12 #include "ui/gl/gl_context.h"
13 #include "ui/gl/gl_implementation.h" 13 #include "ui/gl/gl_implementation.h"
14 #include "ui/gl/gl_switches.h" 14 #include "ui/gl/gl_switches.h"
15 #include "ui/gl/init/gl_factory.h" 15 #include "ui/gl/init/gl_factory.h"
16 16
17 #if defined(USE_OZONE)
18 #include "ui/ozone/public/ozone_platform.h"
19 #endif
20
17 #if defined(USE_X11) 21 #if defined(USE_X11)
18 #include <X11/Xlib.h> 22 #include <X11/Xlib.h>
19 #include "ui/platform_window/x11/x11_window.h" 23 #include "ui/platform_window/x11/x11_window.h"
20 #endif 24 #endif
21 25
22 namespace gl { 26 namespace gl {
23 27
24 // static 28 // static
25 void GLSurfaceTestSupport::InitializeOneOff() { 29 void GLSurfaceTestSupport::InitializeOneOff() {
26 DCHECK_EQ(kGLImplementationNone, GetGLImplementation()); 30 DCHECK_EQ(kGLImplementationNone, GetGLImplementation());
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 80
77 bool gpu_service_logging = false; 81 bool gpu_service_logging = false;
78 bool disable_gl_drawing = false; 82 bool disable_gl_drawing = false;
79 83
80 CHECK(init::InitializeGLOneOffImplementation( 84 CHECK(init::InitializeGLOneOffImplementation(
81 impl, fallback_to_osmesa, gpu_service_logging, disable_gl_drawing)); 85 impl, fallback_to_osmesa, gpu_service_logging, disable_gl_drawing));
82 } 86 }
83 87
84 // static 88 // static
85 void GLSurfaceTestSupport::InitializeOneOffWithMockBindings() { 89 void GLSurfaceTestSupport::InitializeOneOffWithMockBindings() {
90 #if defined(USE_OZONE)
91 // This function skips where Ozone is otherwise initialized.
92 ui::OzonePlatform::InitializeForGPU();
93 #endif
86 InitializeOneOffImplementation(kGLImplementationMockGL, false); 94 InitializeOneOffImplementation(kGLImplementationMockGL, false);
87 } 95 }
88 96
89 } // namespace gl 97 } // namespace gl
OLDNEW
« ui/gl/init/ozone_util.h ('K') | « ui/gl/test/DEPS ('k') | ui/ozone/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698