[Webkit-unassigned] [Bug 63871] [Chromium] canvas/philip/tests/2d.gradient.object.update.html is failed on chromium.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jul 8 10:43:22 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=63871
--- Comment #7 from Stephen White <senorblanco at chromium.org> 2011-07-08 10:43:22 PST ---
(In reply to comment #6)
> I agree this looks very invasive. Looking further up, I wonder why skia has this dual between graphicscontext->m_state (which has the gradient) and platformcontext which has the skia gradient. I notice the the webkit Gradient object itself holds a cache of the skia gradient, and it is correctly purged when addColorStop is called. If skia always went directly to m_state.fillGradient, I think we could skip all of these pushes.
>
> Another clue that something funny is going on. Look in GraphicsContext.cpp
>
>
> #if !USE(SKIA)
> void GraphicsContext::setPlatformFillGradient(Gradient*)
> {
> }
>
> void GraphicsContext::setPlatformFillPattern(Pattern*)
> {
> }
>
> void GraphicsContext::setPlatformStrokeGradient(Gradient*)
> {
> }
>
> void GraphicsContext::setPlatformStrokePattern(Pattern*)
> {
> }
> #endif
>
> All of these seem to exist solely for skia. If we didn't make a (premature) copy of the gradient, but reached directly into m_state each time, I think we would (a) fix this bug, and (b) avoid this whole layer of indirection/copying.
I'm to blame for introducing these, in:
http://trac.webkit.org/changeset/46017
It was to refactor a bunch of cut-and-paste code, so that setupPaintForStroking() and setupPaintForFilling() could handle patterns and gradients, rather than having to cut-and-paste the same 5 lines of code we were using everywhere else for gradients and patterns (see the CL desc).
That may not be relevant anymore; I'm not sure. But anything we come up with should be checked against the tests that were fixed in that CL, at least.
--
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