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

Unified Diff: ui/gfx/gl/gl_surface_glx.cc

Issue 9669006: Force a swap on resize to work around Intel driver issues with PostSubBuffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/gl/gl_surface_glx.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 09c4507b222ef754c08869146598d1e3e94c5d83..04eebd7993e951bdbe5fd643083cc030089f36d6 100644
--- a/ui/gfx/gl/gl_surface_glx.cc
+++ b/ui/gfx/gl/gl_surface_glx.cc
@@ -124,6 +124,15 @@ bool NativeViewGLSurfaceGLX::Initialize() {
void NativeViewGLSurfaceGLX::Destroy() {
}
+bool NativeViewGLSurfaceGLX::Resize(const gfx::Size& size) {
+ // On Intel drivers, the frame buffer won't be resize until the next swap. If
+ // we only do PostSubBuffer, then we're stuck in the old size. Force a swap
+ // now.
+ if (gfx::g_GLX_MESA_copy_sub_buffer)
+ SwapBuffers();
+ return true;
+}
+
bool NativeViewGLSurfaceGLX::IsOffscreen() {
return false;
}
« no previous file with comments | « ui/gfx/gl/gl_surface_glx.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698