projects
/
platform
/
framework
/
web
/
crosswalk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git]
/
src
/
ui
/
gl
/
gl_context.cc
diff --git
a/src/ui/gl/gl_context.cc
b/src/ui/gl/gl_context.cc
index
dc3a3e8
..
cd9a28c
100644
(file)
--- a/
src/ui/gl/gl_context.cc
+++ b/
src/ui/gl/gl_context.cc
@@
-66,6
+66,13
@@
std::string GLContext::GetGLVersion() {
return std::string(version ? version : "");
}
return std::string(version ? version : "");
}
+std::string GLContext::GetGLRenderer() {
+ DCHECK(IsCurrent(NULL));
+ const char *renderer =
+ reinterpret_cast<const char*>(glGetString(GL_RENDERER));
+ return std::string(renderer ? renderer : "");
+}
+
bool GLContext::HasExtension(const char* name) {
std::string extensions = GetExtensions();
extensions += " ";
bool GLContext::HasExtension(const char* name) {
std::string extensions = GetExtensions();
extensions += " ";
@@
-79,8
+86,9
@@
bool GLContext::HasExtension(const char* name) {
const GLVersionInfo* GLContext::GetVersionInfo() {
if(!version_info_) {
std::string version = GetGLVersion();
const GLVersionInfo* GLContext::GetVersionInfo() {
if(!version_info_) {
std::string version = GetGLVersion();
+ std::string renderer = GetGLRenderer();
version_info_ = scoped_ptr<GLVersionInfo>(
version_info_ = scoped_ptr<GLVersionInfo>(
- new GLVersionInfo(version.c_str()));
+ new GLVersionInfo(version.c_str()
, renderer.c_str()
));
}
return version_info_.get();
}
}
return version_info_.get();
}