Make GrSmallPathAtlasMgr and GrSmallPathShapeData v1-only files
This is part of making everything in the gpu/ops directory be v1-only.
Bug: skia:11837
Change-Id: I9709ffc140a77d4d68f3838e3d30374df0913889
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440156
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
diff --git a/src/gpu/GrDirectContext.cpp b/src/gpu/GrDirectContext.cpp
index dd287b8..cb9edf0 100644
--- a/src/gpu/GrDirectContext.cpp
+++ b/src/gpu/GrDirectContext.cpp
@@ -25,10 +25,19 @@
#include "src/gpu/effects/GrSkSLFP.h"
#include "src/gpu/gl/GrGLGpu.h"
#include "src/gpu/mock/GrMockGpu.h"
-#include "src/gpu/ops/GrSmallPathAtlasMgr.h"
#include "src/gpu/text/GrAtlasManager.h"
#include "src/gpu/text/GrStrikeCache.h"
#include "src/image/SkImage_GpuBase.h"
+#if SK_GPU_V1
+#include "src/gpu/ops/GrSmallPathAtlasMgr.h"
+#else
+// A vestigial definition for v2 that will never be instantiated
+class GrSmallPathAtlasMgr {
+public:
+ GrSmallPathAtlasMgr() { SkASSERT(0); }
+ void reset() { SkASSERT(0); }
+};
+#endif
#ifdef SK_METAL
#include "include/gpu/mtl/GrMtlBackendContext.h"
#include "src/gpu/mtl/GrMtlTrampoline.h"
@@ -366,6 +375,7 @@
}
GrSmallPathAtlasMgr* GrDirectContext::onGetSmallPathAtlasMgr() {
+#if SK_GPU_V1
if (!fSmallPathAtlasMgr) {
fSmallPathAtlasMgr = std::make_unique<GrSmallPathAtlasMgr>();
@@ -375,6 +385,7 @@
if (!fSmallPathAtlasMgr->initAtlas(this->proxyProvider(), this->caps())) {
return nullptr;
}
+#endif
return fSmallPathAtlasMgr.get();
}
diff --git a/src/gpu/ops/GrMeshDrawOp.h b/src/gpu/ops/GrMeshDrawOp.h
index bc7c9f3..6cc0c3f0 100644
--- a/src/gpu/ops/GrMeshDrawOp.h
+++ b/src/gpu/ops/GrMeshDrawOp.h
@@ -19,7 +19,6 @@
class GrMeshDrawTarget;
class GrOpFlushState;
struct GrSimpleMesh;
-class GrSmallPathAtlasMgr;
class GrStrikeCache;
/**