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

Unified Diff: third_party/WebKit/Source/platform/graphics/filters/FEComposite.cpp

Issue 1849213002: Remove SK_SUPPORT_LEGACY_XFERMODE_PTR (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adopt the pointer but don't ref it Created 4 years, 9 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/filters/FEComposite.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/filters/FEComposite.cpp b/third_party/WebKit/Source/platform/graphics/filters/FEComposite.cpp
index 035ee87b738f578d4d97c71be9149af0c21a2777..083af5a0e01461b80752eefda4a6dbc48202fc30 100644
--- a/third_party/WebKit/Source/platform/graphics/filters/FEComposite.cpp
+++ b/third_party/WebKit/Source/platform/graphics/filters/FEComposite.cpp
@@ -28,6 +28,7 @@
#include "SkXfermodeImageFilter.h"
#include "platform/graphics/filters/SkiaImageFilterBuilder.h"
+#include "platform/graphics/skia/SkiaUtils.h"
#include "platform/text/TextStream.h"
namespace blink {
@@ -205,12 +206,12 @@ PassRefPtr<SkImageFilter> FEComposite::createImageFilterInternal(SkiaImageFilter
RefPtr<SkImageFilter> foreground(builder.build(inputEffect(0), operatingColorSpace(), !mayProduceInvalidPreMultipliedPixels()));
RefPtr<SkImageFilter> background(builder.build(inputEffect(1), operatingColorSpace(), !mayProduceInvalidPreMultipliedPixels()));
SkImageFilter::CropRect cropRect = getCropRect();
- RefPtr<SkXfermode> mode;
+ sk_sp<SkXfermode> mode;
if (m_type == FECOMPOSITE_OPERATOR_ARITHMETIC)
- mode = adoptRef(SkArithmeticMode::Create(SkFloatToScalar(m_k1), SkFloatToScalar(m_k2), SkFloatToScalar(m_k3), SkFloatToScalar(m_k4), requiresPMColorValidation));
+ mode = SkArithmeticMode::Make(SkFloatToScalar(m_k1), SkFloatToScalar(m_k2), SkFloatToScalar(m_k3), SkFloatToScalar(m_k4), requiresPMColorValidation);
else
- mode = adoptRef(SkXfermode::Create(toXfermode(m_type)));
- return adoptRef(SkXfermodeImageFilter::Create(mode.get(), background.get(), foreground.get(), &cropRect));
+ mode = SkXfermode::Make(toXfermode(m_type));
+ return fromSkSp(SkXfermodeImageFilter::Make(mode, background.get(), foreground.get(), &cropRect));
f(malita) 2016/04/01 18:16:00 std::move(mode)
}
static TextStream& operator<<(TextStream& ts, const CompositeOperationType& type)

Powered by Google App Engine
This is Rietveld 408576698