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

Unified Diff: gm/imagefiltersbase.cpp

Issue 376953003: Clean up SkImageFilter constructors. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixed 100-col issues Created 6 years, 5 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 | « no previous file | gm/imagefiltersgraph.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imagefiltersbase.cpp
diff --git a/gm/imagefiltersbase.cpp b/gm/imagefiltersbase.cpp
index 4779c81438ee226cb5f19d57ba32377907340b9b..0760fcda760e1cbf8a6024040d3b0ec440a6539e 100644
--- a/gm/imagefiltersbase.cpp
+++ b/gm/imagefiltersbase.cpp
@@ -24,14 +24,14 @@ public:
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(FailImageFilter)
protected:
- FailImageFilter() : INHERITED(0) {}
+ FailImageFilter() : INHERITED(0, NULL) {}
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE {
return false;
}
FailImageFilter(SkReadBuffer& buffer)
- : INHERITED(1, buffer) {}
+ : INHERITED(0, buffer) {}
private:
typedef SkImageFilter INHERITED;
@@ -44,13 +44,13 @@ static SkFlattenable::Registrar gFailImageFilterReg("FailImageFilter",
class IdentityImageFilter : public SkImageFilter {
public:
- static IdentityImageFilter* Create() {
- return SkNEW(IdentityImageFilter);
+ static IdentityImageFilter* Create(SkImageFilter* input = NULL) {
+ return SkNEW_ARGS(IdentityImageFilter, (input));
}
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(IdentityImageFilter)
protected:
- IdentityImageFilter() : INHERITED(0) {}
+ IdentityImageFilter(SkImageFilter* input) : INHERITED(1, &input) {}
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE {
*result = src;
« no previous file with comments | « no previous file | gm/imagefiltersgraph.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698