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

Side by Side Diff: ui/gl/gl_bindings.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/gl_bindings.h ('k') | ui/gl/gl_bindings_autogen_egl.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(USE_EGL) 7 #if defined(USE_EGL)
8 #include <EGL/egl.h> 8 #include <EGL/egl.h>
9 #endif 9 #endif
10 10
(...skipping 22 matching lines...) Expand all
33 const char* str = nullptr; 33 const char* str = nullptr;
34 str = wglGetExtensionsStringARB(GLSurfaceWGL::GetDisplayDC()); 34 str = wglGetExtensionsStringARB(GLSurfaceWGL::GetDisplayDC());
35 if (str) 35 if (str)
36 return str; 36 return str;
37 return wglGetExtensionsStringEXT(); 37 return wglGetExtensionsStringEXT();
38 } 38 }
39 #endif 39 #endif
40 40
41 #if defined(USE_EGL) 41 #if defined(USE_EGL)
42 std::string DriverEGL::GetPlatformExtensions() { 42 std::string DriverEGL::GetPlatformExtensions() {
43 EGLDisplay display = GLSurfaceEGL::InitializeDisplay(); 43 EGLDisplay display = GLSurfaceEGL::GetHardwareDisplay();
44 if (display == EGL_NO_DISPLAY) 44 if (display == EGL_NO_DISPLAY)
45 return ""; 45 return "";
46 const char* str = eglQueryString(display, EGL_EXTENSIONS); 46 const char* str = eglQueryString(display, EGL_EXTENSIONS);
47 return str ? std::string(str) : ""; 47 return str ? std::string(str) : "";
48 } 48 }
49 49
50 // static 50 // static
51 std::string DriverEGL::GetClientExtensions() { 51 std::string DriverEGL::GetClientExtensions() {
52 const char* str = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS); 52 const char* str = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS);
53 return str ? std::string(str) : ""; 53 return str ? std::string(str) : "";
54 } 54 }
55 #endif 55 #endif
56 56
57 #if defined(USE_GLX) 57 #if defined(USE_GLX)
58 std::string DriverGLX::GetPlatformExtensions() { 58 std::string DriverGLX::GetPlatformExtensions() {
59 const char* str = glXQueryExtensionsString(gfx::GetXDisplay(), 0); 59 const char* str = glXQueryExtensionsString(gfx::GetXDisplay(), 0);
60 return str ? std::string(str) : ""; 60 return str ? std::string(str) : "";
61 } 61 }
62 #endif 62 #endif
63 63
64 } // namespace gl 64 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_bindings.h ('k') | ui/gl/gl_bindings_autogen_egl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698