| Index: content/common/gpu/image_transport_surface_linux.cc
|
| diff --git a/content/common/gpu/image_transport_surface_linux.cc b/content/common/gpu/image_transport_surface_linux.cc
|
| index a394c9b6a7b8fe6449ee3c35f5e96500bd2e8fff..5cc75badd1c9ad9060a167ee30257e2448479014 100644
|
| --- a/content/common/gpu/image_transport_surface_linux.cc
|
| +++ b/content/common/gpu/image_transport_surface_linux.cc
|
| @@ -112,6 +112,7 @@ class GLXImageTransportSurface : public ImageTransportSurface,
|
| virtual bool SwapBuffers() OVERRIDE;
|
| virtual gfx::Size GetSize() OVERRIDE;
|
| virtual bool OnMakeCurrent(gfx::GLContext* context) OVERRIDE;
|
| + virtual void SetVisible(bool visible) OVERRIDE;
|
|
|
| protected:
|
| // ImageTransportSurface implementation:
|
| @@ -461,6 +462,17 @@ void GLXImageTransportSurface::ReleaseSurface() {
|
| bound_ = false;
|
| }
|
|
|
| +void GLXImageTransportSurface::SetVisible(bool visible) {
|
| + Display* dpy = static_cast<Display*>(GetDisplay());
|
| + if (!visible) {
|
| + XResizeWindow(dpy, window_, 1, 1);
|
| + } else {
|
| + XResizeWindow(dpy, window_, size_.width(), size_.height());
|
| + needs_resize_ = true;
|
| + }
|
| + glXWaitX();
|
| +}
|
| +
|
| void GLXImageTransportSurface::OnResize(gfx::Size size) {
|
| TRACE_EVENT0("gpu", "GLXImageTransportSurface::OnResize");
|
| size_ = size;
|
|
|