Always turn off domain in GrTextureOp for no-aa/nearest
Fixes an issue on Mali-400 where fragment shader domain check causes precision loss of texture coords even when vertex texture coords are inside the domain. Change-Id: I3e1ea2c7ee7a73a0c1e8df76421afa432f986b88 Reviewed-on: https://skia-review.googlesource.com/c/159324 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
This commit is contained in:
parent
e749c2f30c
commit
f09abc58ad
@ -696,15 +696,17 @@ private:
|
||||
if (GrAAType::kCoverage == this->aaType()) {
|
||||
fAAType = static_cast<unsigned>(GrAAType::kNone);
|
||||
aaFlags = GrQuadAAFlags::kNone;
|
||||
// We may have had a strict constraint with nearest filter solely due to
|
||||
// possible AA bloat. In that case it's no longer necessary.
|
||||
}
|
||||
}
|
||||
}
|
||||
// We may have had a strict constraint with nearest filter solely due to possible AA bloat.
|
||||
// If we don't have (or determined we don't need) coverage AA then we can skip using a
|
||||
// domain.
|
||||
if (constraint == SkCanvas::kStrict_SrcRectConstraint &&
|
||||
fFilter == GrSamplerState::Filter::kNearest) {
|
||||
fFilter == GrSamplerState::Filter::kNearest &&
|
||||
this->aaType() != GrAAType::kCoverage) {
|
||||
constraint = SkCanvas::kFast_SrcRectConstraint;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
const auto& draw = fDraws.emplace_back(srcRect, quad, aaFlags, constraint, color);
|
||||
this->setBounds(bounds, HasAABloat::kNo, IsZeroArea::kNo);
|
||||
fDomain = static_cast<bool>(draw.domain());
|
||||
|
Loading…
Reference in New Issue
Block a user