diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-01-11 21:08:55 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-01-11 21:08:55 +0000 |
commit | 371e105da5d9fdfff3b4242b37ff6fc09214c8c8 (patch) | |
tree | cfcca4200f2b8eb016f6ea3643f2602bc4076909 /src/effects/SkLightingImageFilter.cpp | |
parent | 95146ebc43175ae0c1cd3a116509d92aa1a445ab (diff) |
Add GrEffect::updateKnownColorComponents(). It is used to determine whether the output of an effect has a constant output value for r,g,b, or a.
Review URL: https://codereview.appspot.com/7064057
git-svn-id: http://skia.googlecode.com/svn/trunk@7144 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/effects/SkLightingImageFilter.cpp')
-rw-r--r-- | src/effects/SkLightingImageFilter.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp index 48f16b3ff8..fc819deb17 100644 --- a/src/effects/SkLightingImageFilter.cpp +++ b/src/effects/SkLightingImageFilter.cpp @@ -311,6 +311,13 @@ public: const SkLight* light() const { return fLight; } SkScalar surfaceScale() const { return fSurfaceScale; } + + virtual void getConstantColorComponents(GrColor* color, + uint32_t* validFlags) const SK_OVERRIDE { + // lighting shaders are complicated. We just throw up our hands. + *validFlags = 0; + } + private: typedef GrSingleTextureEffect INHERITED; const SkLight* fLight; |