Take edge AA flags into account when applying implicit device bounds clip
Bug: skia:13114 Change-Id: I1e6552aaeee68eaf4e50e42da2a7761953b06415 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526019 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This commit is contained in:
parent
121d4a2e4b
commit
7f5033d714
@ -475,8 +475,13 @@ SurfaceDrawContext::QuadOptimization SurfaceDrawContext::attemptQuadOptimization
|
||||
return QuadOptimization::kClipApplied;
|
||||
} else {
|
||||
// Update result to store the render target bounds in order and then fall
|
||||
// through to attempt the draw->native clear optimization
|
||||
result = GrClip::PreClipResult(SkRRect::MakeRect(rtRect), *aa);
|
||||
// through to attempt the draw->native clear optimization. Pick an AA value such
|
||||
// that any geometric clipping doesn't need to change aa or edge flags (since we
|
||||
// know this is on pixel boundaries, it will draw the same regardless).
|
||||
// See skbug.com/13114 for more details.
|
||||
GrAA clipAA = (*aa == GrAA::kNo || quad->fEdgeFlags == GrQuadAAFlags::kNone) ?
|
||||
GrAA::kNo : GrAA::kYes;
|
||||
result = GrClip::PreClipResult(SkRRect::MakeRect(rtRect), clipAA);
|
||||
}
|
||||
break;
|
||||
case GrClip::Effect::kClipped:
|
||||
|
Loading…
Reference in New Issue
Block a user