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

Unified Diff: src/effects/SkBlurMaskFilter.cpp

Issue 1743553003: Make GrRRectBlurEffect::onIsEqual include the roundrect's rect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | no next file » | 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 1be030baf6a1065207af41f6c3cd3990298278f1..3eac76f3e18ef8e2354950c53aace8b15f9b83b3 100644
--- a/src/effects/SkBlurMaskFilter.cpp
+++ b/src/effects/SkBlurMaskFilter.cpp
@@ -1024,7 +1024,9 @@ GrRRectBlurEffect::GrRRectBlurEffect(float sigma, const SkRRect& rrect, GrTextur
bool GrRRectBlurEffect::onIsEqual(const GrFragmentProcessor& other) const {
const GrRRectBlurEffect& rrbe = other.cast<GrRRectBlurEffect>();
- return fRRect.getSimpleRadii().fX == rrbe.fRRect.getSimpleRadii().fX && fSigma == rrbe.fSigma;
+ return fRRect.getSimpleRadii().fX == rrbe.fRRect.getSimpleRadii().fX &&
+ fSigma == rrbe.fSigma &&
+ fRRect.rect() == rrbe.fRRect.rect();
}
//////////////////////////////////////////////////////////////////////////////
@@ -1117,7 +1119,7 @@ void GrGLRRectBlurEffect::emitCode(EmitArgs& args) {
void GrGLRRectBlurEffect::onSetData(const GrGLSLProgramDataManager& pdman,
const GrProcessor& proc) {
const GrRRectBlurEffect& brre = proc.cast<GrRRectBlurEffect>();
- SkRRect rrect = brre.getRRect();
+ const SkRRect& rrect = brre.getRRect();
float blurRadius = 3.f*SkScalarCeilToScalar(brre.getSigma()-1/6.0f);
pdman.set1f(fBlurRadiusUniform, blurRadius);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698