Index: third_party/WebKit/Source/core/paint/SVGPaintContext.cpp |
diff --git a/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp b/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp |
index c595c9ce65df225c11c2bd9ac0c7e474697ad047..e080d685791c1709bce9a0a71d30e6d68f78ecac 100644 |
--- a/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp |
+++ b/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp |
@@ -32,6 +32,7 @@ |
#include "core/layout/svg/SVGResourcesCache.h" |
#include "core/paint/SVGMaskPainter.h" |
#include "platform/FloatConversion.h" |
+#include "wtf/PtrUtil.h" |
namespace blink { |
@@ -89,7 +90,7 @@ bool SVGPaintContext::applyClipMaskAndFilterIfNecessary() |
return false; |
if (!isIsolationInstalled() && SVGLayoutSupport::isIsolationRequired(&m_object)) |
- m_compositingRecorder = adoptPtr(new CompositingRecorder(paintInfo().context, m_object, SkXfermode::kSrcOver_Mode, 1)); |
+ m_compositingRecorder = wrapUnique(new CompositingRecorder(paintInfo().context, m_object, SkXfermode::kSrcOver_Mode, 1)); |
return true; |
} |
@@ -108,7 +109,7 @@ void SVGPaintContext::applyCompositingIfNecessary() |
style.blendMode() : WebBlendModeNormal; |
if (opacity < 1 || blendMode != WebBlendModeNormal) { |
const FloatRect compositingBounds = m_object.paintInvalidationRectInLocalSVGCoordinates(); |
- m_compositingRecorder = adoptPtr(new CompositingRecorder(paintInfo().context, m_object, |
+ m_compositingRecorder = wrapUnique(new CompositingRecorder(paintInfo().context, m_object, |
WebCoreCompositeToSkiaComposite(CompositeSourceOver, blendMode), opacity, &compositingBounds)); |
} |
} |
@@ -128,7 +129,7 @@ bool SVGPaintContext::applyClipIfNecessary(SVGResources* resources) |
ShapeClipPathOperation* clipPath = toShapeClipPathOperation(clipPathOperation); |
if (!clipPath->isValid()) |
return false; |
- m_clipPathRecorder = adoptPtr(new ClipPathRecorder(paintInfo().context, m_object, clipPath->path(m_object.objectBoundingBox()))); |
+ m_clipPathRecorder = wrapUnique(new ClipPathRecorder(paintInfo().context, m_object, clipPath->path(m_object.objectBoundingBox()))); |
} |
} |
return true; |
@@ -150,7 +151,7 @@ bool SVGPaintContext::applyFilterIfNecessary(SVGResources* resources) |
if (m_object.style()->svgStyle().hasFilter()) |
return false; |
} else if (LayoutSVGResourceFilter* filter = resources->filter()) { |
- m_filterRecordingContext = adoptPtr(new SVGFilterRecordingContext(paintInfo().context)); |
+ m_filterRecordingContext = wrapUnique(new SVGFilterRecordingContext(paintInfo().context)); |
m_filter = filter; |
GraphicsContext* filterContext = SVGFilterPainter(*filter).prepareEffect(m_object, *m_filterRecordingContext); |
if (!filterContext) |
@@ -158,7 +159,7 @@ bool SVGPaintContext::applyFilterIfNecessary(SVGResources* resources) |
// Because the filter needs to cache its contents we replace the context |
// during filtering with the filter's context. |
- m_filterPaintInfo = adoptPtr(new PaintInfo(*filterContext, m_paintInfo)); |
+ m_filterPaintInfo = wrapUnique(new PaintInfo(*filterContext, m_paintInfo)); |
// Because we cache the filter contents and do not invalidate on paint |
// invalidation rect changes, we need to paint the entire filter region |