REGRESSION(112745) [CSS Filters] Memory use explosion for offscreen filtered elements
https://bugs.webkit.org/show_bug.cgi?id=83815
Reviewed by Simon Fraser.
Source/WebCore:
The filtered area used to be the dirty rect intersected by the bounding box of the
layer. During a previous change that behavior was lost, so adding it back now.
Also, removing the memory buffers used to compute filters after the filter is computed.
They are deleted next time the filter is applied anyway, so there's no need to keep the
memory for them.
Test: css3/filters/offscreen-filters-memory-usage.html
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::prepare):
(WebCore):
(WebCore::FilterEffectRenderer::clearIntermediateResults):
(WebCore::FilterEffectRendererHelper::prepareFilterEffect):
(WebCore::FilterEffectRendererHelper::applyFilterEffect):
* rendering/FilterEffectRenderer.h:
(FilterEffectRenderer):
LayoutTests:
Adding a test that creates a lot of layers outside the viewport. The memory should not grow
and the browser should not crash.
* css3/filters/offscreen-filters-memory-usage-expected.txt: Added.
* css3/filters/offscreen-filters-memory-usage.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114046
268f45cc-cd09-0410-ab3c-
d52691b4dbfc