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

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

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 d0fbe4ece623a9715e26f1a4d8b04ecc0c685071..0244a5ad1c2253784a392fc76d6ab770ded780b7 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
@@ -49,7 +49,6 @@
#include "third_party/skia/include/utils/SkNullCanvas.h"
#include "wtf/Assertions.h"
#include "wtf/MathExtras.h"
-#include <memory>
namespace blink {
@@ -176,7 +175,7 @@ void GraphicsContext::setShadow(const FloatSize& offset, float blur, const Color
if (contextDisabled())
return;
- std::unique_ptr<DrawLooperBuilder> drawLooperBuilder = DrawLooperBuilder::create();
+ OwnPtr<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
@@ -195,7 +194,7 @@ void GraphicsContext::setShadow(const FloatSize& offset, float blur, const Color
setDrawLooper(std::move(drawLooperBuilder));
}
-void GraphicsContext::setDrawLooper(std::unique_ptr<DrawLooperBuilder> drawLooperBuilder)
+void GraphicsContext::setDrawLooper(PassOwnPtr<DrawLooperBuilder> drawLooperBuilder)
{
if (contextDisabled())
return;
@@ -434,7 +433,7 @@ void GraphicsContext::drawInnerShadow(const FloatRoundedRect& rect, const Color&
clip(rect.rect());
}
- std::unique_ptr<DrawLooperBuilder> drawLooperBuilder = DrawLooperBuilder::create();
+ OwnPtr<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