aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/effects/SkTableMaskFilter.h
diff options
context:
space:
mode:
authorGravatar schenney <schenney@chromium.org>2015-10-06 12:59:55 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-10-06 12:59:55 -0700
commit95376a0dde3cdf414eb97a20cef3af19ed7e0151 (patch)
treeb304b560eec5feed75d621c1aa3ec9a7df2573d9 /include/effects/SkTableMaskFilter.h
parentccb88bcab03c2d7450b25f614b9203b8b9d7640d (diff)
Revert of factories should return baseclass, allowing the impl to specialize (patchset #4 id:60001 of https://codereview.chromium.org/1390523005/ )
Reason for revert: Breaks Chrome with this link error: ../../third_party/skia/include/effects/SkMorphologyImageFilter.h:75: error: undefined reference to 'SkMorphologyImageFilter::SkMorphologyImageFilter(int, int, SkImageFilter*, SkImageFilter::CropRect const*)' ../../third_party/skia/include/effects/SkMorphologyImageFilter.h:104: error: undefined reference to 'SkMorphologyImageFilter::SkMorphologyImageFilter(int, int, SkImageFilter*, SkImageFilter::CropRect const*)' Presumably due to code in third_party/WebKit/Source/platform/graphics/filters/FEMorphology.cpp that contains: #include "SkMorphologyImageFilter.h" ... if (m_type == FEMORPHOLOGY_OPERATOR_DILATE) return adoptRef(SkDilateImageFilter::Create(radiusX, radiusY, input.get(), &rect)); return adoptRef(SkErodeImageFilter::Create(radiusX, radiusY, input.get(), &rect)); Original issue's description: > factories should return baseclass, allowing the impl to specialize > > waiting on https://codereview.chromium.org/1386163002/# to land > > BUG=skia:4424 > > Committed: https://skia.googlesource.com/skia/+/80a6dcaa1b757826ed7414f64b035d512d9ccbf8 TBR=senorblanco@google.com,robertphillips@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4424 Review URL: https://codereview.chromium.org/1389063002
Diffstat (limited to 'include/effects/SkTableMaskFilter.h')
-rw-r--r--include/effects/SkTableMaskFilter.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/effects/SkTableMaskFilter.h b/include/effects/SkTableMaskFilter.h
index 757ddf2084..1d530877cc 100644
--- a/include/effects/SkTableMaskFilter.h
+++ b/include/effects/SkTableMaskFilter.h
@@ -18,6 +18,8 @@
*/
class SK_API SkTableMaskFilter : public SkMaskFilter {
public:
+ virtual ~SkTableMaskFilter();
+
/** Utility that sets the gamma table
*/
static void MakeGammaTable(uint8_t table[256], SkScalar gamma);
@@ -27,37 +29,35 @@ public:
*/
static void MakeClipTable(uint8_t table[256], uint8_t min, uint8_t max);
- static SkMaskFilter* Create(const uint8_t table[256]) {
+ static SkTableMaskFilter* Create(const uint8_t table[256]) {
return new SkTableMaskFilter(table);
}
- static SkMaskFilter* CreateGamma(SkScalar gamma) {
+ static SkTableMaskFilter* CreateGamma(SkScalar gamma) {
uint8_t table[256];
MakeGammaTable(table, gamma);
return new SkTableMaskFilter(table);
}
- static SkMaskFilter* CreateClip(uint8_t min, uint8_t max) {
+ static SkTableMaskFilter* CreateClip(uint8_t min, uint8_t max) {
uint8_t table[256];
MakeClipTable(table, min, max);
return new SkTableMaskFilter(table);
}
SkMask::Format getFormat() const override;
- bool filterMask(SkMask*, const SkMask&, const SkMatrix&, SkIPoint*) const override;
+ virtual bool filterMask(SkMask*, const SkMask&, const SkMatrix&,
+ SkIPoint*) const override;
SK_TO_STRING_OVERRIDE()
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTableMaskFilter)
protected:
- virtual ~SkTableMaskFilter();
-
- void flatten(SkWriteBuffer&) const override;
-
-private:
SkTableMaskFilter();
explicit SkTableMaskFilter(const uint8_t table[256]);
+ void flatten(SkWriteBuffer&) const override;
+private:
uint8_t fTable[256];
typedef SkMaskFilter INHERITED;