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

Unified Diff: app/gfx/gl/gl_context_linux.cc

Issue 5105006: Resize synchronization for Linux. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Moved IPC call up to GpuCommandBufferStub via callback to satisfy checkdeps. Created 10 years, 1 month 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
Index: app/gfx/gl/gl_context_linux.cc
diff --git a/app/gfx/gl/gl_context_linux.cc b/app/gfx/gl/gl_context_linux.cc
index fd0b7b984b1d06bfc55b95602f4b655a63afeee8..bed9e18927adc449ec680907318fb955706f46bc 100644
--- a/app/gfx/gl/gl_context_linux.cc
+++ b/app/gfx/gl/gl_context_linux.cc
@@ -47,6 +47,7 @@ class ViewGLContext : public GLContext {
virtual bool IsOffscreen();
virtual bool SwapBuffers();
virtual gfx::Size GetSize();
+ virtual void SetSize(gfx::Size size);
virtual void* GetHandle();
virtual void SetSwapInterval(int interval);
@@ -315,6 +316,14 @@ gfx::Size ViewGLContext::GetSize() {
return gfx::Size(attributes.width, attributes.height);
}
+void ViewGLContext::SetSize(gfx::Size size) {
+ // Need to flush the GL commands in flight so that the resize operation
+ // doesn't damage the backbuffer.
+ glFinish();
+
+ GLContext::SetSize(size);
+}
+
void* ViewGLContext::GetHandle() {
return context_;
}

Powered by Google App Engine
This is Rietveld 408576698