[Webkit-unassigned] [Bug 57717] Convert use of raw pointers to RefPtr in using Cairo

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 5 08:34:24 PDT 2011


Martin Robinson <mrobinson at webkit.org> changed:

           What    |Removed                     |Added
  Attachment #88212|review?, commit-queue?      |review-
               Flag|                            |

--- Comment #13 from Martin Robinson <mrobinson at webkit.org>  2011-04-05 08:34:23 PST ---
(From update of attachment 88212)
View in context: https://bugs.webkit.org/attachment.cgi?id=88212&action=review

r- because of some minor style issues and a possible leak you might be able to fix!

> Source/WebCore/platform/graphics/ContextShadow.h:38
> +#include "RefPtrCairo.h"
> +#endif
>  #include <wtf/RefCounted.h>

This should be in separate block.

> Source/WebCore/platform/graphics/ContextShadow.h:133
> +    RefPtr<cairo_surface_t> m_layerImage; // Buffer to where the temporary shadow will be drawn to.
> +    RefPtr<cairo_t> m_layerContext; // Context used to paint the shadow to the layer image.
> +#else

Why not use change the typedefs above instead of adding #ifdefs to the code?

> Source/WebCore/platform/graphics/cairo/CairoPath.h:35
>          static cairo_surface_t* pathSurface = cairo_image_surface_create(CAIRO_FORMAT_A8, 1, 1);
> -        m_cr = cairo_create(pathSurface);
> +        m_cr = adoptRef(cairo_create(pathSurface));

Looking at this now, isn't the surface leaked? It scould be a RefPtr here too.

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