Tweak GrSmallPathAtlasMgr's cached path discovery methods
In an ideal world we wouldn't keep re-allocating the memory for the keys
Change-Id: I3b7954e131d483166d0bf0ce95510365869b134c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309123
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/ops/GrSmallPathShapeData.cpp b/src/gpu/ops/GrSmallPathShapeData.cpp
index 2f9ce79..5356569 100644
--- a/src/gpu/ops/GrSmallPathShapeData.cpp
+++ b/src/gpu/ops/GrSmallPathShapeData.cpp
@@ -9,7 +9,7 @@
#include "src/gpu/geometry/GrStyledShape.h"
-void GrSmallPathShapeDataKey::set(const GrStyledShape& shape, uint32_t dim) {
+GrSmallPathShapeDataKey::GrSmallPathShapeDataKey(const GrStyledShape& shape, uint32_t dim) {
// Shapes' keys are for their pre-style geometry, but by now we shouldn't have any
// relevant styling information.
SkASSERT(shape.style().isSimpleFill());
@@ -20,7 +20,7 @@
shape.writeUnstyledKey(&fKey[1]);
}
-void GrSmallPathShapeDataKey::set(const GrStyledShape& shape, const SkMatrix& ctm) {
+GrSmallPathShapeDataKey::GrSmallPathShapeDataKey(const GrStyledShape& shape, const SkMatrix& ctm) {
// Shapes' keys are for their pre-style geometry, but by now we shouldn't have any
// relevant styling information.
SkASSERT(shape.style().isSimpleFill());