Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1523)

Unified Diff: Source/core/paint/SVGShapePainter.cpp

Issue 1129793005: Replace OwnPtr with WTF::Optional for optional recorders. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: merge with master Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/paint/SVGShapePainter.cpp
diff --git a/Source/core/paint/SVGShapePainter.cpp b/Source/core/paint/SVGShapePainter.cpp
index 0cb6aff4f7cf1ed8b7011907e2fc4953563a2ae3..1b240fa4a7e3dbeb4683035aa35a6f7460946e97 100644
--- a/Source/core/paint/SVGShapePainter.cpp
+++ b/Source/core/paint/SVGShapePainter.cpp
@@ -21,6 +21,7 @@
#include "platform/graphics/paint/DisplayItemListContextRecorder.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/core/SkPicture.h"
+#include "wtf/Optional.h"
namespace blink {
@@ -220,9 +221,9 @@ void SVGShapePainter::paintMarker(const PaintInfo& paintInfo, LayoutSVGResourceM
markerPaintInfo.rect = LayoutRect::infiniteIntRect();
TransformRecorder transformRecorder(*markerPaintInfo.context, marker, marker.markerTransformation(position.origin, position.angle, strokeWidth));
- OwnPtr<FloatClipRecorder> clipRecorder;
+ Optional<FloatClipRecorder> clipRecorder;
if (SVGLayoutSupport::isOverflowHidden(&marker))
- clipRecorder = adoptPtr(new FloatClipRecorder(*markerPaintInfo.context, marker, markerPaintInfo.phase, marker.viewport()));
+ clipRecorder.emplace(*markerPaintInfo.context, marker, markerPaintInfo.phase, marker.viewport());
SVGContainerPainter(marker).paint(markerPaintInfo);
}

Powered by Google App Engine
This is Rietveld 408576698