Index: Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp |
=================================================================== |
--- Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp (revision 99500) |
+++ Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp (working copy) |
@@ -166,6 +166,10 @@ |
if (m_capabilities.usingMapSub) |
extensions->ensureEnabled("GL_CHROMIUM_map_sub"); |
+ m_capabilities.usingSetVisibility = extensions->supports("GL_CHROMIUM_set_visibility"); |
+ if (m_capabilities.usingSetVisibility) |
+ extensions->ensureEnabled("GL_CHROMIUM_set_visibility"); |
+ |
GLC(m_context.get(), m_context->getIntegerv(GraphicsContext3D::MAX_TEXTURE_SIZE, &m_capabilities.maxTextureSize)); |
m_capabilities.bestTextureFormat = PlatformColor::bestTextureFormat(m_context.get()); |
@@ -212,6 +216,16 @@ |
LOG_ERROR("GL command failed: File: %s\n\tLine %d\n\tcommand: %s, error %x\n", file, line, command, static_cast<int>(error)); |
} |
+void LayerRendererChromium::setVisible(bool visible) |
+{ |
+ if (!visible) |
+ releaseRenderSurfaceTextures(); |
+ if (m_capabilities.usingSetVisibility) { |
+ Extensions3DChromium* extensions3DChromium = static_cast<Extensions3DChromium*>(m_context->getExtensions()); |
+ extensions3DChromium->setVisibilityCHROMIUM(visible); |
+ } |
+} |
+ |
void LayerRendererChromium::releaseRenderSurfaceTextures() |
{ |
m_renderSurfaceTextureManager->evictAndDeleteAllTextures(m_renderSurfaceTextureAllocator.get()); |