[Webkit-unassigned] [Bug 58807] Create RIAA class for GraphicsContext::save() and restore()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 20 10:31:49 PDT 2011


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


Eric Seidel <eric at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #90354|review?                     |review+
               Flag|                            |




--- Comment #2 from Eric Seidel <eric at webkit.org>  2011-04-20 10:31:50 PST ---
(From update of attachment 90354)
View in context: https://bugs.webkit.org/attachment.cgi?id=90354&action=review

Looks great.

> Source/WebCore/platform/graphics/GraphicsContext.h:556
> +    class GraphicsContextStateSaver {

Kinda a mouth-full, but I don't have better.

> Source/WebCore/platform/graphics/GraphicsContext.h:560
> +        : m_context(context)
> +        , m_saveAndRestore(saveAndRestore)

I think we technically indent these on level (differnet from how xcode does things).

> Source/WebCore/platform/graphics/GraphicsContext.h:576
> +            ASSERT(!m_saveAndRestore);
> +            m_context.save();
> +            m_saveAndRestore = true;

We could make this a counter instead.  Not sure how useful that would be.

> Source/WebCore/rendering/RenderBoxModelObject.cpp:638
> +    GraphicsContextStateSaver clipToBorderStateSaver(*context, clipToBorderRadius);
> +    if (clipToBorderRadius) {

Oh, that's so sexy.

> Source/WebCore/rendering/RenderBoxModelObject.cpp:1525
> +                ++outerBorderTopWidth;
> +                ++outerBorderBottomWidth;
> +                ++outerBorderLeftWidth;
> +                ++outerBorderRightWidth;

Bleh.  (For another patch. :)

> Source/WebCore/rendering/RenderBoxModelObject.cpp:1553
> +        GraphicsContextStateSaver graphicsStateSaver(*graphicsContext);

You call it "stateSaver" other places.

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