Bug 50417

Summary: Avoid repainting compositing layers unnecessarily when layout changes
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: Layout and RenderingAssignee: Simon Fraser (smfr) <simon.fraser>
Status: NEW    
Severity: Normal CC: dino, ed_dvd, igor.oliveira, jchaffraix, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on: 74370    
Bug Blocks:    

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.