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

Side by Side Diff: ui/gl/init/gl_initializer_x11.cc

Issue 2136553002: Remove GetPlatformDefaultEGLNativeDisplay() function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Back to original. Created 4 years, 5 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 | « ui/gl/init/gl_initializer_win.cc ('k') | no next file » | 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 "ui/gl/init/gl_initializer.h" 5 #include "ui/gl/init/gl_initializer.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 "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/threading/thread_restrictions.h" 10 #include "base/threading/thread_restrictions.h"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 #include "ui/gfx/x/x11_types.h"
12 #include "ui/gl/gl_bindings.h" 13 #include "ui/gl/gl_bindings.h"
13 #include "ui/gl/gl_egl_api_implementation.h" 14 #include "ui/gl/gl_egl_api_implementation.h"
14 #include "ui/gl/gl_gl_api_implementation.h" 15 #include "ui/gl/gl_gl_api_implementation.h"
15 #include "ui/gl/gl_glx_api_implementation.h" 16 #include "ui/gl/gl_glx_api_implementation.h"
16 #include "ui/gl/gl_implementation_osmesa.h" 17 #include "ui/gl/gl_implementation_osmesa.h"
17 #include "ui/gl/gl_osmesa_api_implementation.h" 18 #include "ui/gl/gl_osmesa_api_implementation.h"
18 #include "ui/gl/gl_surface_egl.h" 19 #include "ui/gl/gl_surface_egl.h"
19 #include "ui/gl/gl_surface_glx.h" 20 #include "ui/gl/gl_surface_glx.h"
20 #include "ui/gl/gl_surface_osmesa_x11.h" 21 #include "ui/gl/gl_surface_osmesa_x11.h"
21 #include "ui/gl/gl_switches.h" 22 #include "ui/gl/gl_switches.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 return false; 131 return false;
131 } 132 }
132 return true; 133 return true;
133 case kGLImplementationOSMesaGL: 134 case kGLImplementationOSMesaGL:
134 if (!GLSurfaceOSMesaX11::InitializeOneOff()) { 135 if (!GLSurfaceOSMesaX11::InitializeOneOff()) {
135 LOG(ERROR) << "GLSurfaceOSMesaX11::InitializeOneOff failed."; 136 LOG(ERROR) << "GLSurfaceOSMesaX11::InitializeOneOff failed.";
136 return false; 137 return false;
137 } 138 }
138 return true; 139 return true;
139 case kGLImplementationEGLGLES2: 140 case kGLImplementationEGLGLES2:
140 if (!GLSurfaceEGL::InitializeOneOff()) { 141 if (!GLSurfaceEGL::InitializeOneOff(gfx::GetXDisplay())) {
141 LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed."; 142 LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed.";
142 return false; 143 return false;
143 } 144 }
144 return true; 145 return true;
145 default: 146 default:
146 return true; 147 return true;
147 } 148 }
148 } 149 }
149 150
150 bool InitializeStaticGLBindings(GLImplementation implementation) { 151 bool InitializeStaticGLBindings(GLImplementation implementation) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 187
187 void ClearGLBindingsPlatform() { 188 void ClearGLBindingsPlatform() {
188 ClearGLBindingsEGL(); 189 ClearGLBindingsEGL();
189 ClearGLBindingsGL(); 190 ClearGLBindingsGL();
190 ClearGLBindingsGLX(); 191 ClearGLBindingsGLX();
191 ClearGLBindingsOSMESA(); 192 ClearGLBindingsOSMESA();
192 } 193 }
193 194
194 } // namespace init 195 } // namespace init
195 } // namespace gl 196 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/init/gl_initializer_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698