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

Unified Diff: src/effects/SkEmbossMaskFilter.cpp

Issue 173633003: Factory methods for heap-allocated SkMaskFilter objects. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add SkTableMaskFilter::Create(table) and remove deprecated SkEmbossMaskFilter constructor. Created 6 years, 10 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
« no previous file with comments | « samplecode/SampleEmboss.cpp ('k') | src/views/SkWidgets.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkEmbossMaskFilter.cpp
diff --git a/src/effects/SkEmbossMaskFilter.cpp b/src/effects/SkEmbossMaskFilter.cpp
index 6747bf5b388ab7373e9dea6d44aa64b6bb15eab5..ab549ccac8d8552aebb73dcb3d88310b3499d08c 100644
--- a/src/effects/SkEmbossMaskFilter.cpp
+++ b/src/effects/SkEmbossMaskFilter.cpp
@@ -49,7 +49,7 @@ SkMaskFilter* SkBlurMaskFilter::CreateEmboss(SkScalar blurSigma, const SkScalar
light.fAmbient = SkToU8(am);
light.fSpecular = SkToU8(sp);
- return SkNEW_ARGS(SkEmbossMaskFilter, (blurSigma, light));
+ return SkEmbossMaskFilter::Create(blurSigma, light);
}
///////////////////////////////////////////////////////////////////////////////
@@ -68,13 +68,6 @@ SkEmbossMaskFilter::SkEmbossMaskFilter(SkScalar blurSigma, const Light& light)
normalize(fLight.fDirection);
}
-SkEmbossMaskFilter::SkEmbossMaskFilter(const Light& light, SkScalar blurRadius)
- : fLight(light) {
- normalize(fLight.fDirection);
-
- fBlurSigma = SkBlurMask::ConvertRadiusToSigma(blurRadius);
-}
-
SkMask::Format SkEmbossMaskFilter::getFormat() const {
return SkMask::k3D_Format;
}
« no previous file with comments | « samplecode/SampleEmboss.cpp ('k') | src/views/SkWidgets.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698