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

Unified Diff: src/effects/SkDisplacementMapEffect.cpp

Issue 617853003: Revert of Add isSingleComponent bool to getConstantColorComponent (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 | « src/effects/SkColorMatrixFilter.cpp ('k') | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkDisplacementMapEffect.cpp
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index ace9e028660097479b5bdacf380e16a4d5dfdc28..474d9a7dc8123f8eec5c76fd3bf5ae95d71f26d7 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -351,10 +351,10 @@
typedef GrGLDisplacementMapEffect GLProcessor;
static const char* Name() { return "DisplacementMap"; }
+ virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags) const SK_OVERRIDE;
+
private:
virtual bool onIsEqual(const GrProcessor&) const SK_OVERRIDE;
-
- virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERRIDE;
GrDisplacementMapEffect(SkDisplacementMapEffect::ChannelSelectorType xChannelSelector,
SkDisplacementMapEffect::ChannelSelectorType yChannelSelector,
@@ -491,14 +491,14 @@
return GrTBackendFragmentProcessorFactory<GrDisplacementMapEffect>::getInstance();
}
-void GrDisplacementMapEffect::onComputeInvariantOutput(InvariantOutput* inout) const {
+void GrDisplacementMapEffect::getConstantColorComponents(GrColor*,
+ uint32_t* validFlags) const {
// Any displacement offset bringing a pixel out of bounds will output a color of (0,0,0,0),
// so the only way we'd get a constant alpha is if the input color image has a constant alpha
// and no displacement offset push any texture coordinates out of bounds OR if the constant
// alpha is 0. Since this isn't trivial to compute at this point, let's assume the output is
// not of constant color when a displacement effect is applied.
- inout->fValidFlags = 0;
- inout->fIsSingleComponent = false;
+ *validFlags = 0;
}
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « src/effects/SkColorMatrixFilter.cpp ('k') | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698