[Webkit-unassigned] [Bug 21883] [CAIRO] globalAlpha has to be stored and restored

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 28 18:56:49 PDT 2008


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





------- Comment #5 from alp at nuanti.com  2008-10-28 18:56 PDT -------
(From update of attachment 24717)
This version of the patch looks pretty good. It makes sense to use the WebCore
graphics state stack here rather than maintaining separate stacks that have to
be maintained manually. Some comments..


>Index: WebCore/platform/graphics/GraphicsContextPrivate.h
>===================================================================
>--- WebCore/platform/graphics/GraphicsContextPrivate.h	(revision 37888)
>+++ WebCore/platform/graphics/GraphicsContextPrivate.h	(working copy)
>@@ -50,6 +50,9 @@ namespace WebCore {
>             : textDrawingMode(cTextFill)
>             , strokeStyle(SolidStroke)
>             , strokeThickness(0)

This would usually be '1.0f':

>+#if PLATFORM(CAIRO)
>+            , globalAlpha(1)
>+#endif


I think we'll still need to go through this code some time later and make sure
we're using globalAlpha consistently everywhere it's needed, and to avoid
creating temporary surfaces (which can be inefficient) where globalAlpha can
just be multiplied with the pen color's alpha, but that doesn't really block
this getting landed.

Going to wait for the build to get fixed before r+'ing and to give anyone else
who's interested a chance to comment.


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