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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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: third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
index 0244a5ad1c2253784a392fc76d6ab770ded780b7..d0fbe4ece623a9715e26f1a4d8b04ecc0c685071 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
@@ -49,6 +49,7 @@
#include "third_party/skia/include/utils/SkNullCanvas.h"
#include "wtf/Assertions.h"
#include "wtf/MathExtras.h"
+#include <memory>
namespace blink {
@@ -175,7 +176,7 @@ void GraphicsContext::setShadow(const FloatSize& offset, float blur, const Color
if (contextDisabled())
return;
- OwnPtr<DrawLooperBuilder> drawLooperBuilder = DrawLooperBuilder::create();
+ std::unique_ptr<DrawLooperBuilder> drawLooperBuilder = DrawLooperBuilder::create();
if (!color.alpha()) {
// When shadow-only but there is no shadow, we use an empty draw looper
// to disable rendering of the source primitive. When not shadow-only, we
@@ -194,7 +195,7 @@ void GraphicsContext::setShadow(const FloatSize& offset, float blur, const Color
setDrawLooper(std::move(drawLooperBuilder));
}
-void GraphicsContext::setDrawLooper(PassOwnPtr<DrawLooperBuilder> drawLooperBuilder)
+void GraphicsContext::setDrawLooper(std::unique_ptr<DrawLooperBuilder> drawLooperBuilder)
{
if (contextDisabled())
return;
@@ -433,7 +434,7 @@ void GraphicsContext::drawInnerShadow(const FloatRoundedRect& rect, const Color&
clip(rect.rect());
}
- OwnPtr<DrawLooperBuilder> drawLooperBuilder = DrawLooperBuilder::create();
+ std::unique_ptr<DrawLooperBuilder> drawLooperBuilder = DrawLooperBuilder::create();
drawLooperBuilder->addShadow(FloatSize(shadowOffset), shadowBlur, shadowColor,
DrawLooperBuilder::ShadowRespectsTransforms, DrawLooperBuilder::ShadowIgnoresAlpha);
setDrawLooper(std::move(drawLooperBuilder));

Powered by Google App Engine
This is Rietveld 408576698