[Webkit-unassigned] [Bug 23435] Pass SVG spreadMethod to Gradient::platformGradient() and use it on Skia

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 21 13:37:21 PST 2009


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





------- Comment #6 from zimmermann at kde.org  2009-01-21 13:37 PDT -------
(From update of attachment 26903)
Looks good. Though you need to obey some parameter names, as the mac build
recently fails on 'unused variable' warnings.

> Index: WebCore/platform/graphics/cg/GradientCG.cpp
> ===================================================================
> --- WebCore/platform/graphics/cg/GradientCG.cpp	(revision 39831)
> +++ WebCore/platform/graphics/cg/GradientCG.cpp	(working copy)
> @@ -50,7 +50,7 @@ static void gradientCallback(void* info,
>      out[3] = a;
>  }
>  
> -CGShadingRef Gradient::platformGradient()
> +CGShadingRef Gradient::platformGradient(GradientSpreadMethod spreadMethod)
Obey the 'spreadMethod' name here.

> Index: WebCore/platform/graphics/qt/GradientQt.cpp
> ===================================================================
> --- WebCore/platform/graphics/qt/GradientQt.cpp	(revision 39831)
> +++ WebCore/platform/graphics/qt/GradientQt.cpp	(working copy)
> @@ -40,7 +40,7 @@ void Gradient::platformDestroy()
>      m_gradient = 0;
>  }
>  
> -QGradient* Gradient::platformGradient()
> +QGradient* Gradient::platformGradient(GradientSpreadMethod spreadMethod)
Same here, not sure if Linux builds fail as well, but better safe than sorry.

> Index: WebCore/platform/graphics/wx/GradientWx.cpp
> ===================================================================
> --- WebCore/platform/graphics/wx/GradientWx.cpp	(revision 39831)
> +++ WebCore/platform/graphics/wx/GradientWx.cpp	(working copy)
> @@ -36,7 +36,7 @@ void Gradient::platformDestroy()
>      notImplemented();
>  }
>  
> -PlatformGradient Gradient::platformGradient()
> +PlatformGradient Gradient::platformGradient(GradientSpreadMethod spreadMethod)
Ditto.

While I didn't comment on this before, I still like to raise the issue: Why is
spread method living in GraphicsContext anyways?
It seems to me it better fits in the 'Gradient' class anyway (as the gradient
stops live there as well) - this way we wouldn't
need to pass down the spreadMethod() in a lot of calls.

What do you think? If you have strong reasons against, we might as well r+ the
patch as it looks fine, though maybe it's unnecessary...


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



More information about the webkit-unassigned mailing list