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

Unified Diff: include/effects/SkTableMaskFilter.h

Issue 1389063002: Revert of factories should return baseclass, allowing the impl to specialize (Closed) Base URL: https://skia.googlesource.com/skia.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
« no previous file with comments | « include/effects/SkRectShaderImageFilter.h ('k') | include/effects/SkTestImageFilters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkTableMaskFilter.h
diff --git a/include/effects/SkTableMaskFilter.h b/include/effects/SkTableMaskFilter.h
index 757ddf208489df94b09a3bf3398f299d437ef4a1..1d530877cc95a1d860120482bee5b3465da79483 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 @@
*/
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();
-
+ SkTableMaskFilter();
+ explicit SkTableMaskFilter(const uint8_t table[256]);
void flatten(SkWriteBuffer&) const override;
private:
- SkTableMaskFilter();
- explicit SkTableMaskFilter(const uint8_t table[256]);
-
uint8_t fTable[256];
typedef SkMaskFilter INHERITED;
« no previous file with comments | « include/effects/SkRectShaderImageFilter.h ('k') | include/effects/SkTestImageFilters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698