[webkit-reviews] review granted: [Bug 73754] Avoid calling calculateRects in RenderLayer::paintLayer when the rectangles are not needed : [Attachment 117981] Proposed change 2: hopefully the |shouldPaint| logic should be clearer, also changed RenderLayerBacking.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 6 10:49:44 PST 2011


Simon Fraser (smfr) <simon.fraser at apple.com> has granted Julien Chaffraix
<jchaffraix at webkit.org>'s request for review:
Bug 73754: Avoid calling calculateRects in RenderLayer::paintLayer when the
rectangles are not needed
https://bugs.webkit.org/show_bug.cgi?id=73754

Attachment 117981: Proposed change 2: hopefully the |shouldPaint| logic should
be clearer, also changed RenderLayerBacking.
https://bugs.webkit.org/attachment.cgi?id=117981&action=review

------- Additional Comments from Simon Fraser (smfr) <simon.fraser at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=117981&action=review


> Source/WebCore/rendering/RenderLayer.cpp:2802
> +    bool paintingOverlayScrollbars = paintFlags &
PaintLayerPaintingOverlayScrollbars;

Maybe shouldPaintOverlayScrollbars for consistency. Or remove the 'should' from
all of these.

> Source/WebCore/rendering/RenderLayer.cpp:2805
> +    bool shouldPaintRenderer = m_hasVisibleContent && isSelfPaintingLayer &&
!paintingOverlayScrollbars;

I'd call this shouldPaintContent

> Source/WebCore/rendering/RenderLayer.cpp:2812
> +	   // FIXME: We compute all the rectangles when
paintingOverlayScrollbars but we use only |damageRect|.

This FIXME is only interesting if calculateRects does a lot of useless work in
this case.

> Source/WebCore/rendering/RenderLayerBacking.cpp:1100
> +    bool shouldPaintRenderer = (m_owningLayer->hasVisibleContent() ||
m_owningLayer->hasVisibleDescendant()) && m_owningLayer->isSelfPaintingLayer();


shouldPaintContent or paintContent.


More information about the webkit-reviews mailing list