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

Unified Diff: Source/core/paint/SVGContainerPainter.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/SVGContainerPainter.cpp
diff --git a/Source/core/paint/SVGContainerPainter.cpp b/Source/core/paint/SVGContainerPainter.cpp
index 35ae2684116e6023a862d1b84225f5a5db0d1a5f..13ec1fd99ca1c439c84a434d2ba740e507ea00a4 100644
--- a/Source/core/paint/SVGContainerPainter.cpp
+++ b/Source/core/paint/SVGContainerPainter.cpp
@@ -14,6 +14,7 @@
#include "core/paint/SVGPaintContext.h"
#include "core/paint/TransformRecorder.h"
#include "core/svg/SVGSVGElement.h"
+#include "wtf/Optional.h"
namespace blink {
@@ -36,10 +37,10 @@ void SVGContainerPainter::paint(const PaintInfo& paintInfo)
paintInfoBeforeFiltering.updateCullRectForSVGTransform(m_layoutSVGContainer.localToParentTransform());
TransformRecorder transformRecorder(*paintInfoBeforeFiltering.context, m_layoutSVGContainer, m_layoutSVGContainer.localToParentTransform());
{
- OwnPtr<FloatClipRecorder> clipRecorder;
+ Optional<FloatClipRecorder> clipRecorder;
if (m_layoutSVGContainer.isSVGViewportContainer() && SVGLayoutSupport::isOverflowHidden(&m_layoutSVGContainer)) {
FloatRect viewport = m_layoutSVGContainer.localToParentTransform().inverse().mapRect(toLayoutSVGViewportContainer(m_layoutSVGContainer).viewport());
- clipRecorder = adoptPtr(new FloatClipRecorder(*paintInfoBeforeFiltering.context, m_layoutSVGContainer, paintInfoBeforeFiltering.phase, viewport));
+ clipRecorder.emplace(*paintInfoBeforeFiltering.context, m_layoutSVGContainer, paintInfoBeforeFiltering.phase, viewport);
}
SVGPaintContext paintContext(m_layoutSVGContainer, paintInfoBeforeFiltering);

Powered by Google App Engine
This is Rietveld 408576698