| 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 079294f2bcdcc833edb527e8a9d3e92dd1985673..c9419dcbeb0fc0d817eb7d36e0de808cc6796515 100644
|
| --- a/content/common/gpu/image_transport_surface_linux.cc
|
| +++ b/content/common/gpu/image_transport_surface_linux.cc
|
| @@ -76,6 +76,7 @@ class EGLImageTransportSurface : public ImageTransportSurface,
|
| uint64 surface_id, TransportDIB::Handle surface_handle) OVERRIDE;
|
| virtual void OnBuffersSwappedACK() OVERRIDE;
|
| virtual void OnResize(gfx::Size size) OVERRIDE;
|
| + virtual void OnSetSurfaceVisible(bool visible) OVERRIDE;
|
|
|
| private:
|
| virtual ~EGLImageTransportSurface() OVERRIDE;
|
| @@ -308,6 +309,15 @@ void EGLImageTransportSurface::OnResize(gfx::Size size) {
|
| helper_->SetScheduled(false);
|
| }
|
|
|
| +void EGLImageTransportSurface::OnSetSurfaceVisible(bool visible) {
|
| + if (!visible && back_surface_.get() && front_surface_.get()) {
|
| + ReleaseSurface(&back_surface_);
|
| + } else if (visible && !back_surface_.get() && front_surface_.get()) {
|
| + // Leverage the OnResize hook because it does exactly what we want
|
| + OnResize(front_surface_->size());
|
| + }
|
| +}
|
| +
|
| bool EGLImageTransportSurface::SwapBuffers() {
|
| front_surface_.swap(back_surface_);
|
| DCHECK_NE(front_surface_.get(), static_cast<EGLAcceleratedSurface*>(NULL));
|
|
|