[Webkit-unassigned] [Bug 48516] GraphicsContext: Replace beginPath+addPath with setPath

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 29 02:36:23 PDT 2010


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





--- Comment #10 from Nikolas Zimmermann <zimmermann at kde.org>  2010-10-29 02:36:22 PST ---
I'd like to share my opinion. Let's examine the users of the code, all do:

Path myPath;
path.doSomething();

context->beginPath();
context->addPath(myPath);
context->fillPath();

The problem we want to solve is to avoid multiples copies of the Path object. There are multiple options, like making it RefCounted, which I dislike though.

The point is that the path _has to be created_ and stored in the "client code" that wants to use GraphicsContext. So why storing it again the GraphicsContext?

We should really think about changing this concept, that means fillPath(const Path&), strokePath(const Path&) is a good option IMHO.

The reason why the current concept is as-is, is CoreGraphics cocept of a current path, added to the CGContext. We still satisfy CG by doing this from the fill/strokePath methods.

What do you think?

-- 
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