Expand PlotLocator into a class
This centralizes the PlotLocator code (esp. the construction & accessors). It also allows just the PlotLocator to be passed to hasID - since the AtlasLocator is overkill for that call.
Change-Id: I424b2d075c40ed46219a623f0c99b3101bc7e043
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282861
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrDrawOpAtlas.cpp b/src/gpu/GrDrawOpAtlas.cpp
index 9ee3760..66c911c 100644
--- a/src/gpu/GrDrawOpAtlas.cpp
+++ b/src/gpu/GrDrawOpAtlas.cpp
@@ -127,7 +127,7 @@
, fPlotIndex(plotIndex)
, fGenerationCounter(generationCounter)
, fGenID(fGenerationCounter->next())
- , fPlotLocator(CreatePlotLocator(fPageIndex, fPlotIndex, fGenID))
+ , fPlotLocator(fPageIndex, fPlotIndex, fGenID)
, fData(nullptr)
, fWidth(width)
, fHeight(height)
@@ -222,7 +222,7 @@
fRectanizer.reset();
fGenID = fGenerationCounter->next();
- fPlotLocator = CreatePlotLocator(fPageIndex, fPlotIndex, fGenID);
+ fPlotLocator = PlotLocator(fPageIndex, fPlotIndex, fGenID);
fLastUpload = GrDeferredUploadToken::AlreadyFlushedToken();
fLastUse = GrDeferredUploadToken::AlreadyFlushedToken();