| Index: ui/gl/gl_context_glx.cc
|
| diff --git a/ui/gl/gl_context_glx.cc b/ui/gl/gl_context_glx.cc
|
| index d05264485e1a0d70fc015b66b00e218096dc8c33..dc8226b4b50eb224baba5eb5603a150f18eb79a1 100644
|
| --- a/ui/gl/gl_context_glx.cc
|
| +++ b/ui/gl/gl_context_glx.cc
|
| @@ -244,6 +244,18 @@ std::string GLContextGLX::GetExtensions() {
|
| return GLContext::GetExtensions();
|
| }
|
|
|
| +bool GLContextGLX::GetTotalGpuMemory(size_t* bytes) {
|
| + DCHECK(bytes);
|
| + *bytes = 0;
|
| + if (HasExtension("GL_NVX_gpu_memory_info")) {
|
| + GLint kbytes = 0;
|
| + glGetIntegerv(GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX, &kbytes);
|
| + *bytes = 1024*kbytes;
|
| + return true;
|
| + }
|
| + return false;
|
| +}
|
| +
|
| bool GLContextGLX::WasAllocatedUsingRobustnessExtension() {
|
| return GLSurfaceGLX::IsCreateContextRobustnessSupported();
|
| }
|
|
|