OLD | NEW |
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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "ui/gl/gl_context.h" | 10 #include "ui/gl/gl_context.h" |
11 #include "ui/gl/gl_implementation.h" | 11 #include "ui/gl/gl_implementation.h" |
12 #include "ui/gl/gl_surface.h" | 12 #include "ui/gl/gl_surface.h" |
13 #include "ui/gl/gl_switches.h" | 13 #include "ui/gl/gl_switches.h" |
14 | 14 |
15 #if defined(USE_X11) | 15 #if defined(USE_X11) |
16 #include <X11/Xlib.h> | 16 #include <X11/Xlib.h> |
17 #include "ui/platform_window/x11/x11_window.h" | 17 #include "ui/platform_window/x11/x11_window.h" |
18 #endif | 18 #endif |
19 | 19 |
20 namespace gfx { | 20 namespace gl { |
21 | 21 |
22 // static | 22 // static |
23 void GLSurfaceTestSupport::InitializeOneOff() { | 23 void GLSurfaceTestSupport::InitializeOneOff() { |
24 DCHECK_EQ(kGLImplementationNone, GetGLImplementation()); | 24 DCHECK_EQ(kGLImplementationNone, GetGLImplementation()); |
25 | 25 |
26 #if defined(USE_X11) | 26 #if defined(USE_X11) |
27 XInitThreads(); | 27 XInitThreads(); |
28 ui::test::SetUseOverrideRedirectWindowByDefault(true); | 28 ui::test::SetUseOverrideRedirectWindowByDefault(true); |
29 #endif | 29 #endif |
30 | 30 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // static | 82 // static |
83 void GLSurfaceTestSupport::InitializeOneOffWithMockBindings() { | 83 void GLSurfaceTestSupport::InitializeOneOffWithMockBindings() { |
84 InitializeOneOffImplementation(kGLImplementationMockGL, false); | 84 InitializeOneOffImplementation(kGLImplementationMockGL, false); |
85 } | 85 } |
86 | 86 |
87 // static | 87 // static |
88 void GLSurfaceTestSupport::InitializeDynamicMockBindings(GLContext* context) { | 88 void GLSurfaceTestSupport::InitializeDynamicMockBindings(GLContext* context) { |
89 CHECK(InitializeDynamicGLBindings(kGLImplementationMockGL, context)); | 89 CHECK(InitializeDynamicGLBindings(kGLImplementationMockGL, context)); |
90 } | 90 } |
91 | 91 |
92 } // namespace gfx | 92 } // namespace gl |
OLD | NEW |