Switch the compositor to "large layer" mode when a layer's size exceeds a reasonable value rather than the max texture size supported by the driver in order to avoid running low on vram on pages that create large layer (zooming in on maps.google.com creates several layers that can be 4Kx4K or bigger). This is a temporary solution until tiled layers are implemented.
Created attachment 70927 [details] Proposed patch
Comment on attachment 70927 [details] Proposed patch Will layers >2000 pixels wide still work at all? Monitors that support resolutions higher than that are still somewhat common
(In reply to comment #2) > (From update of attachment 70927 [details]) > Will layers >2000 pixels wide still work at all? Monitors that support resolutions higher than that are still somewhat common They should work, as long as they are smaller than the max texture size supported by your driver. If you look at the ContentLayerChromium::requiresClippedUpdateRect() we switch to large layer mode when the layer exceeds the larger of 2000 or the browser window's visible area.
Comment on attachment 70927 [details] Proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=70927&action=review R=me > WebCore/platform/graphics/chromium/ContentLayerChromium.cpp:149 > + const int maxLayerSize = 2000; nit: should be static. it'll probably get inlined anyway
Comment on attachment 70927 [details] Proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=70927&action=review > WebCore/platform/graphics/chromium/LayerRendererChromium.h:169 > IntRect m_rootVisibleRect; > IntRect m_rootContentRect; > + IntRect m_currentScissorRect; > Can we remove m_rootContentRect, then? I think the scissor rect replaces its purpose entirely.
(In reply to comment #5) > (From update of attachment 70927 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=70927&action=review > > > WebCore/platform/graphics/chromium/LayerRendererChromium.h:169 > > IntRect m_rootVisibleRect; > > IntRect m_rootContentRect; > > + IntRect m_currentScissorRect; > > > > Can we remove m_rootContentRect, then? I think the scissor rect replaces its purpose entirely. m_currentScissorRect can actually change while drawing the composited layers (for example when we hit a layer that clips its descendants).
(In reply to comment #4) > (From update of attachment 70927 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=70927&action=review > > R=me > > > WebCore/platform/graphics/chromium/ContentLayerChromium.cpp:149 > > + const int maxLayerSize = 2000; > > nit: should be static. it'll probably get inlined anyway Good point. I'll fix that before checking in.
> Can we remove m_rootContentRect, then? I think the scissor rect replaces its purpose entirely. Oops, my mistake. It's still getting used.
Committed r70010: <http://trac.webkit.org/changeset/70010>