[Webkit-unassigned] [Bug 103510] Reduce the children repaints when moved multiple times during the layout

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 4 01:06:16 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=103510





--- Comment #14 from Carlos Garcia Campos <cgarcia at igalia.com>  2012-12-04 01:08:41 PST ---
(In reply to comment #11)
> (From update of attachment 177239 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=177239&action=review
> 
> Looks pretty good. Needs a couple small improvements.
> 
> > Source/WebCore/rendering/RenderFlexibleBox.cpp:336
> > +    WTF::Vector<LayoutRect> childrenOldRects;
> 
> Should be just Vector. Not WTF::Vector. Also, we should choose some amount of inline capacity to cut down on memory allocation and make performance better. A number large enough that it’s often larger than the number of children, but not so large that we use a ton of stack space.

This is a good point, we should probably use the same number for the childSizes vector. I think we could use 8. 

> > Source/WebCore/rendering/RenderFlexibleBox.cpp:370
> > +void RenderFlexibleBox::childrenFrameRects(WTF::Vector<LayoutRect>& childrenFrameRects)
> 
> No WTF prefix needed here.

Yes, I thought the same, but I saw the WTF prefix was used everywhere in RenderFlexibleBox, so I used it for consistency. I'll remove it.

> A function like this that uses an out parameter should have “get” in its name. Or “append” to make clear its contract is that it appends to an existing vector.

Ok, I'll use add or append then, thanks!

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list