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

Unified Diff: src/effects/SkBlurMaskFilter.cpp

Issue 643743003: Create helper functions to use in computeInvariantOutput calls (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update blurMaskFilter 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/SkArithmeticMode.cpp ('k') | src/effects/SkColorCubeFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBlurMaskFilter.cpp
diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp
index 79cf7e64949f21346990ba07560ba74961308029..30c7206e77691e755855556f024e8b3a8cce7fad 100644
--- a/src/effects/SkBlurMaskFilter.cpp
+++ b/src/effects/SkBlurMaskFilter.cpp
@@ -692,7 +692,7 @@ void GrGLRectBlurEffect::emitCode(GrGLFPBuilder* builder,
OutputRectBlurProfileLookup(fsBuilder, samplers[0], "vert_lookup", profileSizeName, "translatedPos.y", "height", "wh.y");
fsBuilder->codeAppendf("\tfloat final = horiz_lookup * vert_lookup;\n");
- fsBuilder->codeAppendf("\t%s = src * vec4(final);\n", outputColor );
+ fsBuilder->codeAppendf("\t%s = src * final;\n", outputColor );
}
void GrGLRectBlurEffect::setData(const GrGLProgramDataManager& pdman,
@@ -766,8 +766,7 @@ bool GrRectBlurEffect::onIsEqual(const GrProcessor& sBase) const {
}
void GrRectBlurEffect::onComputeInvariantOutput(InvariantOutput* inout) const {
- inout->fValidFlags = 0;
- inout->fIsSingleComponent = false;
+ inout->mulByUnknownAlpha();
}
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrRectBlurEffect);
@@ -930,8 +929,7 @@ GrFragmentProcessor* GrRRectBlurEffect::Create(GrContext* context, float sigma,
}
void GrRRectBlurEffect::onComputeInvariantOutput(InvariantOutput* inout) const {
- inout->fValidFlags = 0;
- inout->fIsSingleComponent = false;
+ inout->mulByUnknownAlpha();
}
const GrBackendFragmentProcessorFactory& GrRRectBlurEffect::getFactory() const {
« no previous file with comments | « src/effects/SkArithmeticMode.cpp ('k') | src/effects/SkColorCubeFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698