[Webkit-unassigned] [Bug 100413] [cg] RenderBlock::selectionGaps() is extremely slow when there are many floats
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Oct 25 14:28:55 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=100413
--- Comment #2 from Darin Adler <darin at apple.com> 2012-10-25 14:30:03 PST ---
(From update of attachment 170730)
View in context: https://bugs.webkit.org/attachment.cgi?id=170730&action=review
I’m OK with this, but I suspect there may be two other variations that work equally well or perhaps even better.
> Source/WebCore/ChangeLog:10
> + RenderBlock::selectionGaps() calls GraphicsContext::clipOut(const IntRect&) for each float.
> + With Core Graphics, A function that takes a vector of rectangles and clips them all out at
> + once is faster than multiple calls to the function that clips out a single rectangle.
Is the issue here the performance of repeatedly calling the CGContextGetClipBoundingBox function?
If so, could we fix this performance issue another way by simply using a wide open rectangle instead of calling CGContextGetClipBoundingBox?
> Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:1080
> + CGContextBeginPath(context);
> + CGContextAddRects(context, cgRects, 2);
> + CGContextEOClip(context);
Can the calls to CGContextBeginPath and CGContextEOClip be moved outside the loop? I don’t entirely understand the semantics here, but if all the rectangles are exclusive or'ed with each other, it seems that it could all be done with a single path.
--
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