| Index: ui/gfx/gl/gl_surface_glx.cc
|
| diff --git a/ui/gfx/gl/gl_surface_glx.cc b/ui/gfx/gl/gl_surface_glx.cc
|
| index 373bc857d48d02593c7663405aa97ddbebb222dc..3b8cbe9a789d1071ce9886171c4eedd9c0f7531d 100644
|
| --- a/ui/gfx/gl/gl_surface_glx.cc
|
| +++ b/ui/gfx/gl/gl_surface_glx.cc
|
| @@ -73,10 +73,12 @@ bool GLSurfaceGLX::InitializeOneOff() {
|
| return true;
|
| }
|
|
|
| +// static
|
| const char* GLSurfaceGLX::GetGLXExtensions() {
|
| return g_glx_extensions;
|
| }
|
|
|
| +// static
|
| bool GLSurfaceGLX::HasGLXExtension(const char* name) {
|
| DCHECK(name);
|
| const char* c_extensions = GetGLXExtensions();
|
| @@ -91,6 +93,7 @@ bool GLSurfaceGLX::HasGLXExtension(const char* name) {
|
| return extensions.find(delimited_name) != std::string::npos;
|
| }
|
|
|
| +// static
|
| bool GLSurfaceGLX::IsCreateContextRobustnessSupported() {
|
| return g_glx_create_context_robustness_supported;
|
| }
|
| @@ -142,6 +145,15 @@ void* NativeViewGLSurfaceGLX::GetHandle() {
|
| return reinterpret_cast<void*>(window_);
|
| }
|
|
|
| +std::string NativeViewGLSurfaceGLX::GetExtensions() {
|
| + std::string extensions = GLSurface::GetExtensions();
|
| + if (g_GLX_MESA_copy_sub_buffer) {
|
| + extensions += extensions.empty() ? "" : " ";
|
| + extensions += "GL_CHROMIUM_post_sub_buffer";
|
| + }
|
| + return extensions;
|
| +}
|
| +
|
| void* NativeViewGLSurfaceGLX::GetConfig() {
|
| if (!config_) {
|
| // This code path is expensive, but we only take it when
|
| @@ -203,13 +215,9 @@ void* NativeViewGLSurfaceGLX::GetConfig() {
|
| return config_;
|
| }
|
|
|
| -bool NativeViewGLSurfaceGLX::SupportsPostSubBuffer() {
|
| - return g_GLX_MESA_copy_sub_buffer;
|
| -}
|
| -
|
| bool NativeViewGLSurfaceGLX::PostSubBuffer(
|
| int x, int y, int width, int height) {
|
| - DCHECK(SupportsPostSubBuffer());
|
| + DCHECK(g_GLX_MESA_copy_sub_buffer);
|
| glXCopySubBufferMESA(g_display, window_, x, y, width, height);
|
| return true;
|
| }
|
|
|