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..bcb0b600c34ffcb7a84103c213f97fea8bce5a0b 100644 |
--- a/app/gfx/gl/gl_context_linux.cc |
+++ b/app/gfx/gl/gl_context_linux.cc |
@@ -17,6 +17,8 @@ |
#include "base/basictypes.h" |
#include "base/logging.h" |
#include "base/scoped_ptr.h" |
+#include "chrome/common/child_thread.h" |
+#include "chrome/common/gpu_messages.h" |
namespace gfx { |
@@ -47,6 +49,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 +318,17 @@ 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(); |
+ |
+ ChildThread* gpu_thread = ChildThread::current(); |
+ bool result = false; |
+ gpu_thread->Send( |
+ new GpuHostMsg_ResizeXID(window_, size.width(), size.height(), &result)); |
Ken Russell (switch to Gerrit)
2010/11/22 22:49:52
This violates a large number of abstraction barrie
jonathan.backer
2010/11/23 16:41:13
Done. Thanks for catching this. I used your callba
|
+} |
+ |
void* ViewGLContext::GetHandle() { |
return context_; |
} |