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:
parent
ee5348b069
commit
e8517147ee
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user