[Webkit-unassigned] [Bug 51799] New: ContextShadow can get the CTM only once and avoid code duplication

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jan 2 00:55:54 PST 2011


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

           Summary: ContextShadow can get the CTM only once and avoid code
                    duplication
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Canvas
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: helder at sencha.com
                CC: ariya.hidayat at gmail.com, simon.fraser at apple.com,
                    mrobinson at webkit.org, mdelaney at apple.com


Currently, ContextShadow defines its own getTransformationMatrixFromContext(), which does exactly the same as GraphicsContext::getCTM(). This can be avoided by passing GraphicsContext instead of PlatformContext to beginShadowLayer(). Additionally, there are two calls to getTransformation...() in beginShadowLayer(): one in adjustBlurDistance() and another in calculateLayerBoundingRect(). There's no reason for this and it can be optimized. Finally, endShadowLayer() would be cleaner from an API POV if no argument was required. There's no need to pass the context once again shortly after the user has called beginShadowLayer() and drawn some primitives. All it takes is to store the pointer to the context in beginShadowLayer().

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