aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/effects
diff options
context:
space:
mode:
authorGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-05 17:38:00 +0000
committerGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-05 17:38:00 +0000
commit254eae2b04a7f810de0ed92803a8bdd18d11babf (patch)
treef630c787522da7472c3123846db61a473e01c706 /include/effects
parent8b129aa3379ece6c43d9ce2ad0cdeafb089b7eb5 (diff)
Change SkLightingImageFilter to derive from SkSingleInputImageFilter, so that it can participate in filter DAGs.
No tests yet. Review URL: https://codereview.appspot.com/6620055 git-svn-id: http://skia.googlecode.com/svn/trunk@5832 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/effects')
-rw-r--r--include/effects/SkLightingImageFilter.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/include/effects/SkLightingImageFilter.h b/include/effects/SkLightingImageFilter.h
index c1ef234ea4..95498bcf12 100644
--- a/include/effects/SkLightingImageFilter.h
+++ b/include/effects/SkLightingImageFilter.h
@@ -9,7 +9,7 @@
#ifndef SkLightingImageFilter_DEFINED
#define SkLightingImageFilter_DEFINED
-#include "SkImageFilter.h"
+#include "SkSingleInputImageFilter.h"
#include "SkColor.h"
class SK_API SkPoint3 {
@@ -47,38 +47,41 @@ public:
class SkLight;
-class SK_API SkLightingImageFilter : public SkImageFilter {
+class SK_API SkLightingImageFilter : public SkSingleInputImageFilter {
public:
static SkImageFilter* CreateDistantLitDiffuse(const SkPoint3& direction,
- SkColor lightColor, SkScalar surfaceScale, SkScalar kd);
+ SkColor lightColor, SkScalar surfaceScale, SkScalar kd,
+ SkImageFilter* input = NULL);
static SkImageFilter* CreatePointLitDiffuse(const SkPoint3& location,
- SkColor lightColor, SkScalar surfaceScale, SkScalar kd);
+ SkColor lightColor, SkScalar surfaceScale, SkScalar kd,
+ SkImageFilter* input = NULL);
static SkImageFilter* CreateSpotLitDiffuse(const SkPoint3& location,
const SkPoint3& target, SkScalar specularExponent, SkScalar cutoffAngle,
- SkColor lightColor, SkScalar surfaceScale, SkScalar kd);
+ SkColor lightColor, SkScalar surfaceScale, SkScalar kd,
+ SkImageFilter* input = NULL);
static SkImageFilter* CreateDistantLitSpecular(const SkPoint3& direction,
SkColor lightColor, SkScalar surfaceScale, SkScalar ks,
- SkScalar shininess);
+ SkScalar shininess, SkImageFilter* input = NULL);
static SkImageFilter* CreatePointLitSpecular(const SkPoint3& location,
SkColor lightColor, SkScalar surfaceScale, SkScalar ks,
- SkScalar shininess);
+ SkScalar shininess, SkImageFilter* input = NULL);
static SkImageFilter* CreateSpotLitSpecular(const SkPoint3& location,
const SkPoint3& target, SkScalar specularExponent, SkScalar cutoffAngle,
SkColor lightColor, SkScalar surfaceScale, SkScalar ks,
- SkScalar shininess);
+ SkScalar shininess, SkImageFilter* input = NULL);
~SkLightingImageFilter();
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
protected:
- SkLightingImageFilter(SkLight* light, SkScalar surfaceScale);
+ SkLightingImageFilter(SkLight* light, SkScalar surfaceScale, SkImageFilter* input);
explicit SkLightingImageFilter(SkFlattenableReadBuffer& buffer);
virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
const SkLight* light() const { return fLight; }
SkScalar surfaceScale() const { return fSurfaceScale; }
private:
- typedef SkImageFilter INHERITED;
+ typedef SkSingleInputImageFilter INHERITED;
SkLight* fLight;
SkScalar fSurfaceScale;
};