signal no clipping required

The original code had the fill vertex method handling the clip, but
each glyph was clipped individually. Signal no clipping at all is need
when the sub run is entirely enclosed in the clip rect.

Change-Id: Ifc7174fe7af967c9ab7240b2c7e2c0b062d7e259
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310556
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This commit is contained in:
Herb Derby 2020-08-14 13:55:20 -04:00 committed by Skia Commit-Bot
parent 9a18b08981
commit e2ba971324

View File

@ -337,6 +337,10 @@ GrDirectMaskSubRun::makeAtlasTextOp(const GrClip* clip, const SkMatrixProvider&
if (result.fIsRRect && result.fRRect.isRect() && result.fAA == GrAA::kNo) {
// Clip geometrically during onPrepare using clipRect.
result.fRRect.getBounds().round(&clipRect);
if (clipRect.contains(subRunBounds)) {
// If fully within the clip, then signal no clipping using the empty rect.
clipRect = SkIRect::MakeEmpty();
}
clip = nullptr;
}
} else if (result.fEffect == GrClip::Effect::kClippedOut) {