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

Unified Diff: src/effects/SkDisplacementMapEffect.cpp

Issue 699943003: Move GrInvariantOutput out of GrProcessor and into its own class. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Cleanup Created 6 years, 1 month 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 62e041a76dc6248546d93c6132cb6a9962d38b6d..d2d858148d51a6e898b10022282516edb38971da 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -13,6 +13,7 @@
#if SK_SUPPORT_GPU
#include "GrContext.h"
#include "GrCoordTransform.h"
+#include "GrInvariantOutput.h"
#include "gl/GrGLProcessor.h"
#include "gl/builders/GrGLProgramBuilder.h"
#include "GrTBackendProcessorFactory.h"
@@ -354,7 +355,7 @@ public:
private:
virtual bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE;
- virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERRIDE;
+ virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE;
GrDisplacementMapEffect(SkDisplacementMapEffect::ChannelSelectorType xChannelSelector,
SkDisplacementMapEffect::ChannelSelectorType yChannelSelector,
@@ -489,13 +490,13 @@ const GrBackendFragmentProcessorFactory& GrDisplacementMapEffect::getFactory() c
return GrTBackendFragmentProcessorFactory<GrDisplacementMapEffect>::getInstance();
}
-void GrDisplacementMapEffect::onComputeInvariantOutput(InvariantOutput* inout) const {
+void GrDisplacementMapEffect::onComputeInvariantOutput(GrInvariantOutput* inout) 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->setToUnknown(InvariantOutput::kWillNot_ReadInput);
+ inout->setToUnknown(GrInvariantOutput::kWillNot_ReadInput);
}
///////////////////////////////////////////////////////////////////////////////
« 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