[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 06:03:31 PDT 2011


--- Comment #6 from Mike Reed <reed at google.com>  2011-07-08 06:03:30 PST ---
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*)

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.

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