Make GrRRectBlurEffect::onIsEqual include the roundrect's rect

BUG=skia:5014
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1743553003

Review URL: https://codereview.chromium.org/1743553003
This commit is contained in:
robertphillips 2016-02-26 08:51:25 -08:00 committed by Commit bot
parent ee5348b069
commit e8517147ee

View File

@ -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);