NEW50417
Avoid repainting compositing layers unnecessarily when layout changes
https://bugs.webkit.org/show_bug.cgi?id=50417
Summary Avoid repainting compositing layers unnecessarily when layout changes
Simon Fraser (smfr)
Reported 2010-12-02 15:54:51 PST
RenderBoxModelObject::styleWillChange() has this code: if (diff == StyleDifferenceLayout) { // When a layout hint happens, we go ahead and do a repaint of the layer, since the layer could // end up being destroyed. if (hasLayer()) { if (style()->position() != newStyle->position() || style()->zIndex() != newStyle->zIndex() || style()->hasAutoZIndex() != newStyle->hasAutoZIndex() || !(style()->clip() == newStyle->clip()) || style()->hasClip() != newStyle->hasClip() || style()->opacity() != newStyle->opacity() || style()->transform() != newStyle->transform()) layer()->repaintIncludingDescendants(); This can cause extra repainting of compositing layers when they don't need to be repainted.
Attachments
Simon Fraser (smfr)
Comment 1 2011-01-13 18:15:33 PST
Simon Fraser (smfr)
Comment 2 2011-01-18 12:21:54 PST
There's also this: inline void RenderObject::setNeedsLayout(bool b, bool markParents) { bool alreadyNeededLayout = m_needsLayout; m_needsLayout = b; if (b) { ASSERT(!isSetNeedsLayoutForbidden()); if (!alreadyNeededLayout) { ... if (hasLayer()) setLayerNeedsFullRepaint();
Simon Fraser (smfr)
Comment 3 2017-08-17 13:11:54 PDT
One specific example we should optimize is to avoid repaints when doing a "positioned movement only" layout.
Note You need to log in before you can comment on or make changes to this bug.