Remove NoCache refs from AtlasTextOp::Geometry

Bug: skia:13214
Change-Id: I4aee7bd73711a464371ebe7892335bfce2fdd09a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529279
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This commit is contained in:
Herb Derby 2022-04-13 15:36:01 -06:00 committed by SkCQ
parent 8b43af48e7
commit 6c76aeb21d
2 changed files with 2 additions and 9 deletions

View File

@ -121,7 +121,6 @@ auto AtlasTextOp::Geometry::MakeForBlob(const GrAtlasSubRun& subRun,
drawOrigin,
clipRect,
std::move(supportData),
nullptr,
color};
}

View File

@ -39,17 +39,14 @@ public:
SkPoint drawOrigin,
SkIRect clipRect,
sk_sp<SkRefCnt> supportData,
GrAtlasSubRunOwner subRunOwner,
const SkPMColor4f& color)
: fSubRun{subRun}
, fSupportDataKeepAlive{std::move(supportData)}
, fSubRunDtor{std::move(subRunOwner)}
, fDrawMatrix{drawMatrix}
, fDrawOrigin{drawOrigin}
, fClipRect{clipRect}
, fColor{color} {
SkASSERT(fSupportDataKeepAlive != nullptr || fSubRunDtor != nullptr);
SkASSERT(SkToBool(fSubRunDtor) != SkToBool(fSupportDataKeepAlive));
SkASSERT(fSupportDataKeepAlive != nullptr);
}
static Geometry* MakeForBlob(const GrAtlasSubRun& subRun,
@ -64,11 +61,8 @@ public:
const GrAtlasSubRun& fSubRun;
// Either this Geometry holds a ref to the support data in the case of a blob based
// SubRun (WithCaching case), or it holds a unique_ptr to a SubRun allocated on the
// GrTextBlobAllocator in the NoCache case. It must hold one, and can't hold both.
// Keep the GrTextBlob or Slug alive until the op is deleted.
sk_sp<SkRefCnt> fSupportDataKeepAlive;
GrAtlasSubRunOwner fSubRunDtor;
const SkMatrix fDrawMatrix;
const SkPoint fDrawOrigin;