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

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

Issue 1387573003: Pass SkiaImageFilterBuilder& to FilterEffect::createImageFilter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/FEConvolveMatrix.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.cpp b/third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.cpp
index 8a3ce41e71bfb42deef76ec7e09e4a0c7949d98b..248f4d55595a39277c05b4c8368eae7ad6cb6a97 100644
--- a/third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.cpp
+++ b/third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.cpp
@@ -136,12 +136,12 @@ bool FEConvolveMatrix::parametersValid() const
return true;
}
-PassRefPtr<SkImageFilter> FEConvolveMatrix::createImageFilter(SkiaImageFilterBuilder* builder)
+PassRefPtr<SkImageFilter> FEConvolveMatrix::createImageFilter(SkiaImageFilterBuilder& builder)
{
if (!parametersValid())
return createTransparentBlack(builder);
- RefPtr<SkImageFilter> input(builder->build(inputEffect(0), operatingColorSpace()));
+ RefPtr<SkImageFilter> input(builder.build(inputEffect(0), operatingColorSpace()));
SkISize kernelSize(SkISize::Make(m_kernelSize.width(), m_kernelSize.height()));
// parametersValid() above checks that the kernel area fits in int.
int numElements = safeCast<int>(m_kernelSize.area());
@@ -153,7 +153,7 @@ PassRefPtr<SkImageFilter> FEConvolveMatrix::createImageFilter(SkiaImageFilterBui
OwnPtr<SkScalar[]> kernel = adoptArrayPtr(new SkScalar[numElements]);
for (int i = 0; i < numElements; ++i)
kernel[i] = SkFloatToScalar(m_kernelMatrix[numElements - 1 - i]);
- SkImageFilter::CropRect cropRect = getCropRect(builder->cropOffset());
+ SkImageFilter::CropRect cropRect = getCropRect(builder.cropOffset());
return adoptRef(SkMatrixConvolutionImageFilter::Create(kernelSize, kernel.get(), gain, bias, target, tileMode, convolveAlpha, input.get(), &cropRect));
}

Powered by Google App Engine
This is Rietveld 408576698