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

Side by Side Diff: ui/gl/gl_implementation_android.cc

Issue 15890002: Display GL window system binding information in about:gpu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/base_paths.h" 5 #include "base/base_paths.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/native_library.h" 9 #include "base/native_library.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 } 125 }
126 126
127 void ClearGLBindings() { 127 void ClearGLBindings() {
128 ClearGLBindingsEGL(); 128 ClearGLBindingsEGL();
129 ClearGLBindingsGL(); 129 ClearGLBindingsGL();
130 SetGLImplementation(kGLImplementationNone); 130 SetGLImplementation(kGLImplementationNone);
131 131
132 UnloadGLNativeLibraries(); 132 UnloadGLNativeLibraries();
133 } 133 }
134 134
135 bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) {
136 *info = GLWindowSystemBindingInfo();
137 switch (GetGLImplementation()) {
138 case kGLImplementationEGLGLES2: {
139 EGLDisplay display = eglGetCurrentDisplay();
140 const char* vendor = eglQueryString(display, EGL_VENDOR);
141 const char* version = eglQueryString(display, EGL_VERSION);
142 const char* extensions = eglQueryString(display, EGL_EXTENSIONS);
143 if (vendor)
144 info->vendor = vendor;
145 if (version)
146 info->version = version;
147 if (extensions)
148 info->extensions = extensions;
149 return true;
150 }
151 default:
152 return false;
153 }
154 return false;
155 }
156
135 } // namespace gfx 157 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698