REGRESSION (r166422): All RenderBox objects grew 104 bytes from adding repaint timers.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 May 2014 10:08:47 +0000 (10:08 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 May 2014 10:08:47 +0000 (10:08 +0000)
commit46846f0c523ce0e8f8b2f76a9b0125220191fb37
treef6cdd0fbce2d86f2ceeffc153d898ab3d4758a08
parente0a06f1b3ec5d7d5b52174abd190a0eb70c3d78e
REGRESSION (r166422): All RenderBox objects grew 104 bytes from adding repaint timers.
<https://webkit.org/b/133027>
<rdar://problem/16867410>

Instead of storing a rarely-used repaint timer on every RenderBox, store one
on the RenderView, and keep a hash set of renderers needing repaint.

Renderers get a flag tracking whether they have a pending lazy repaint.
This way we can avoid hash lookups in the common case.

Also added a static assertion to catch RenderBox growing in the future.

Reviewed by Antti Koivisto.

* rendering/RenderBox.cpp:
(WebCore::SameSizeAsRenderBox::~SameSizeAsRenderBox):
(WebCore::RenderBox::RenderBox):
(WebCore::RenderBox::~RenderBox):
(WebCore::RenderBox::paintBoxDecorations):
(WebCore::RenderBox::layoutOverflowRectForPropagation):
* rendering/RenderBox.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::RenderElement):
* rendering/RenderElement.h:
(WebCore::RenderElement::setRenderBoxNeedsLazyRepaint):
(WebCore::RenderElement::renderBoxNeedsLazyRepaint):
* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):
(WebCore::RenderView::scheduleLazyRepaint):
(WebCore::RenderView::unscheduleLazyRepaint):
(WebCore::RenderView::lazyRepaintTimerFired):
* rendering/RenderView.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168993 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBox.h
Source/WebCore/rendering/RenderElement.cpp
Source/WebCore/rendering/RenderElement.h
Source/WebCore/rendering/RenderView.cpp
Source/WebCore/rendering/RenderView.h