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/ops/GrSmallPathRenderer.cpp b/src/gpu/ops/GrSmallPathRenderer.cpp
index 82722c9..d958e5f 100644
--- a/src/gpu/ops/GrSmallPathRenderer.cpp
+++ b/src/gpu/ops/GrSmallPathRenderer.cpp
@@ -458,7 +458,7 @@
// check to see if df path is cached
ShapeDataKey key(args.fShape, SkScalarCeilToInt(desiredDimension));
shapeData = fShapeCache->find(key);
- if (nullptr == shapeData || !fAtlas->hasID(shapeData->fAtlasLocator)) {
+ if (!shapeData || !fAtlas->hasID(shapeData->fAtlasLocator.plotLocator())) {
// Remove the stale cache entry
if (shapeData) {
fShapeCache->remove(shapeData->fKey);
@@ -483,7 +483,7 @@
// check to see if bitmap path is cached
ShapeDataKey key(args.fShape, args.fViewMatrix);
shapeData = fShapeCache->find(key);
- if (nullptr == shapeData || !fAtlas->hasID(shapeData->fAtlasLocator)) {
+ if (!shapeData || !fAtlas->hasID(shapeData->fAtlasLocator.plotLocator())) {
// Remove the stale cache entry
if (shapeData) {
fShapeCache->remove(shapeData->fKey);