Make remaining GrOp derived classes be skgpu::v1 only
I will follow up with a CL actually moving the newly V1-only files to their final homes and adding namespaces.
Bug: skia:11837
Change-Id: I0fed1a802ae93a4357c53cde2b665ad6ddb49a6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/418996
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/gn/gpu.gni b/gn/gpu.gni
index 49365bf..0f28944 100644
--- a/gn/gpu.gni
+++ b/gn/gpu.gni
@@ -52,8 +52,6 @@
"$_src/gpu/GrBlend.h",
"$_src/gpu/GrBlockAllocator.cpp",
"$_src/gpu/GrBlockAllocator.h",
- "$_src/gpu/GrBlurUtils.cpp",
- "$_src/gpu/GrBlurUtils.h",
"$_src/gpu/GrBuffer.h",
"$_src/gpu/GrBufferAllocPool.cpp",
"$_src/gpu/GrBufferAllocPool.h",
@@ -90,8 +88,6 @@
"$_src/gpu/GrDrawIndirectCommand.h",
"$_src/gpu/GrDrawOpAtlas.cpp",
"$_src/gpu/GrDrawOpAtlas.h",
- "$_src/gpu/GrDrawOpTest.cpp",
- "$_src/gpu/GrDrawOpTest.h",
"$_src/gpu/GrDrawingManager.cpp",
"$_src/gpu/GrDrawingManager.h",
"$_src/gpu/GrDriverBugWorkarounds.cpp",
@@ -136,8 +132,6 @@
"$_src/gpu/GrOpFlushState.h",
"$_src/gpu/GrOpsRenderPass.cpp",
"$_src/gpu/GrOpsRenderPass.h",
- "$_src/gpu/GrOpsTask.cpp",
- "$_src/gpu/GrOpsTask.h",
"$_src/gpu/GrOpsTypes.h",
"$_src/gpu/GrPaint.cpp",
"$_src/gpu/GrPaint.h",
@@ -324,49 +318,10 @@
"$_src/gpu/geometry/GrWangsFormula.h",
"$_src/gpu/ops/GrAAConvexTessellator.cpp",
"$_src/gpu/ops/GrAAConvexTessellator.h",
- "$_src/gpu/ops/GrAtlasTextOp.cpp",
- "$_src/gpu/ops/GrAtlasTextOp.h",
- "$_src/gpu/ops/GrClearOp.cpp",
- "$_src/gpu/ops/GrClearOp.h",
- "$_src/gpu/ops/GrDashOp.cpp",
- "$_src/gpu/ops/GrDashOp.h",
- "$_src/gpu/ops/GrDrawAtlasOp.cpp",
- "$_src/gpu/ops/GrDrawAtlasOp.h",
- "$_src/gpu/ops/GrDrawOp.h",
- "$_src/gpu/ops/GrDrawVerticesOp.cpp",
- "$_src/gpu/ops/GrDrawVerticesOp.h",
- "$_src/gpu/ops/GrDrawableOp.cpp",
- "$_src/gpu/ops/GrDrawableOp.h",
- "$_src/gpu/ops/GrFillRRectOp.cpp",
- "$_src/gpu/ops/GrFillRRectOp.h",
- "$_src/gpu/ops/GrFillRectOp.cpp",
- "$_src/gpu/ops/GrFillRectOp.h",
- "$_src/gpu/ops/GrLatticeOp.cpp",
- "$_src/gpu/ops/GrLatticeOp.h",
- "$_src/gpu/ops/GrMeshDrawOp.cpp",
- "$_src/gpu/ops/GrMeshDrawOp.h",
- "$_src/gpu/ops/GrOp.cpp",
- "$_src/gpu/ops/GrOp.h",
- "$_src/gpu/ops/GrOvalOpFactory.cpp",
- "$_src/gpu/ops/GrOvalOpFactory.h",
- "$_src/gpu/ops/GrQuadPerEdgeAA.cpp",
- "$_src/gpu/ops/GrQuadPerEdgeAA.h",
- "$_src/gpu/ops/GrRegionOp.cpp",
- "$_src/gpu/ops/GrRegionOp.h",
- "$_src/gpu/ops/GrShadowRRectOp.cpp",
- "$_src/gpu/ops/GrShadowRRectOp.h",
- "$_src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp",
- "$_src/gpu/ops/GrSimpleMeshDrawOpHelper.h",
- "$_src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.cpp",
- "$_src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.h",
"$_src/gpu/ops/GrSmallPathAtlasMgr.cpp",
"$_src/gpu/ops/GrSmallPathAtlasMgr.h",
"$_src/gpu/ops/GrSmallPathShapeData.cpp",
"$_src/gpu/ops/GrSmallPathShapeData.h",
- "$_src/gpu/ops/GrStrokeRectOp.cpp",
- "$_src/gpu/ops/GrStrokeRectOp.h",
- "$_src/gpu/ops/GrTextureOp.cpp",
- "$_src/gpu/ops/GrTextureOp.h",
# gradients
"$_src/gpu/gradients/GrGradientBitmapCache.cpp",
@@ -375,18 +330,10 @@
"$_src/gpu/gradients/GrGradientShader.h",
# tessellate
- "$_src/gpu/tessellate/GrAtlasRenderTask.cpp",
- "$_src/gpu/tessellate/GrAtlasRenderTask.h",
"$_src/gpu/tessellate/GrCullTest.h",
"$_src/gpu/tessellate/GrMiddleOutPolygonTriangulator.h",
"$_src/gpu/tessellate/GrPathCurveTessellator.cpp",
"$_src/gpu/tessellate/GrPathCurveTessellator.h",
- "$_src/gpu/tessellate/GrPathInnerTriangulateOp.cpp",
- "$_src/gpu/tessellate/GrPathInnerTriangulateOp.h",
- "$_src/gpu/tessellate/GrPathStencilCoverOp.cpp",
- "$_src/gpu/tessellate/GrPathStencilCoverOp.h",
- "$_src/gpu/tessellate/GrPathTessellateOp.cpp",
- "$_src/gpu/tessellate/GrPathTessellateOp.h",
"$_src/gpu/tessellate/GrPathTessellator.h",
"$_src/gpu/tessellate/GrPathWedgeTessellator.cpp",
"$_src/gpu/tessellate/GrPathWedgeTessellator.h",
@@ -396,8 +343,6 @@
"$_src/gpu/tessellate/GrStrokeHardwareTessellator.cpp",
"$_src/gpu/tessellate/GrStrokeHardwareTessellator.h",
"$_src/gpu/tessellate/GrStrokeIterator.h",
- "$_src/gpu/tessellate/GrStrokeTessellateOp.cpp",
- "$_src/gpu/tessellate/GrStrokeTessellateOp.h",
"$_src/gpu/tessellate/GrStrokeTessellator.h",
"$_src/gpu/tessellate/GrTessellationPathRenderer.h",
"$_src/gpu/tessellate/GrVectorXform.h",
@@ -551,8 +496,14 @@
skia_skgpu_v1_sources = [
"$_src/gpu/GrAuditTrail.cpp",
+ "$_src/gpu/GrBlurUtils.cpp",
+ "$_src/gpu/GrBlurUtils.h",
"$_src/gpu/GrClipStack.cpp",
"$_src/gpu/GrClipStack.h",
+ "$_src/gpu/GrDrawOpTest.cpp",
+ "$_src/gpu/GrDrawOpTest.h",
+ "$_src/gpu/GrOpsTask.cpp",
+ "$_src/gpu/GrOpsTask.h",
"$_src/gpu/GrPathRenderer.cpp",
"$_src/gpu/GrPathRenderer.h",
"$_src/gpu/GrPathRendererChain.cpp",
@@ -574,18 +525,67 @@
"$_src/gpu/ops/GrAtlasInstancedHelper.h",
"$_src/gpu/ops/GrAtlasPathRenderer.cpp",
"$_src/gpu/ops/GrAtlasPathRenderer.h",
+ "$_src/gpu/ops/GrAtlasTextOp.cpp",
+ "$_src/gpu/ops/GrAtlasTextOp.h",
+ "$_src/gpu/ops/GrClearOp.cpp",
+ "$_src/gpu/ops/GrClearOp.h",
"$_src/gpu/ops/GrDashLinePathRenderer.cpp",
"$_src/gpu/ops/GrDashLinePathRenderer.h",
+ "$_src/gpu/ops/GrDashOp.cpp",
+ "$_src/gpu/ops/GrDashOp.h",
"$_src/gpu/ops/GrDefaultPathRenderer.cpp",
"$_src/gpu/ops/GrDefaultPathRenderer.h",
+ "$_src/gpu/ops/GrDrawAtlasOp.cpp",
+ "$_src/gpu/ops/GrDrawAtlasOp.h",
"$_src/gpu/ops/GrDrawAtlasPathOp.cpp",
"$_src/gpu/ops/GrDrawAtlasPathOp.h",
+ "$_src/gpu/ops/GrDrawOp.h",
+ "$_src/gpu/ops/GrDrawVerticesOp.cpp",
+ "$_src/gpu/ops/GrDrawVerticesOp.h",
+ "$_src/gpu/ops/GrDrawableOp.cpp",
+ "$_src/gpu/ops/GrDrawableOp.h",
+ "$_src/gpu/ops/GrFillRRectOp.cpp",
+ "$_src/gpu/ops/GrFillRRectOp.h",
+ "$_src/gpu/ops/GrFillRectOp.cpp",
+ "$_src/gpu/ops/GrFillRectOp.h",
+ "$_src/gpu/ops/GrLatticeOp.cpp",
+ "$_src/gpu/ops/GrLatticeOp.h",
+ "$_src/gpu/ops/GrMeshDrawOp.cpp",
+ "$_src/gpu/ops/GrMeshDrawOp.h",
+ "$_src/gpu/ops/GrOp.cpp",
+ "$_src/gpu/ops/GrOp.h",
+ "$_src/gpu/ops/GrOvalOpFactory.cpp",
+ "$_src/gpu/ops/GrOvalOpFactory.h",
+ "$_src/gpu/ops/GrQuadPerEdgeAA.cpp",
+ "$_src/gpu/ops/GrQuadPerEdgeAA.h",
+ "$_src/gpu/ops/GrRegionOp.cpp",
+ "$_src/gpu/ops/GrRegionOp.h",
+ "$_src/gpu/ops/GrShadowRRectOp.cpp",
+ "$_src/gpu/ops/GrShadowRRectOp.h",
+ "$_src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp",
+ "$_src/gpu/ops/GrSimpleMeshDrawOpHelper.h",
+ "$_src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.cpp",
+ "$_src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.h",
"$_src/gpu/ops/GrSmallPathRenderer.cpp",
"$_src/gpu/ops/GrSmallPathRenderer.h",
+ "$_src/gpu/ops/GrStrokeRectOp.cpp",
+ "$_src/gpu/ops/GrStrokeRectOp.h",
+ "$_src/gpu/ops/GrTextureOp.cpp",
+ "$_src/gpu/ops/GrTextureOp.h",
"$_src/gpu/ops/GrTriangulatingPathRenderer.cpp",
"$_src/gpu/ops/GrTriangulatingPathRenderer.h",
# tessellate
+ "$_src/gpu/tessellate/GrAtlasRenderTask.cpp",
+ "$_src/gpu/tessellate/GrAtlasRenderTask.h",
+ "$_src/gpu/tessellate/GrPathInnerTriangulateOp.cpp",
+ "$_src/gpu/tessellate/GrPathInnerTriangulateOp.h",
+ "$_src/gpu/tessellate/GrPathStencilCoverOp.cpp",
+ "$_src/gpu/tessellate/GrPathStencilCoverOp.h",
+ "$_src/gpu/tessellate/GrPathTessellateOp.cpp",
+ "$_src/gpu/tessellate/GrPathTessellateOp.h",
+ "$_src/gpu/tessellate/GrStrokeTessellateOp.cpp",
+ "$_src/gpu/tessellate/GrStrokeTessellateOp.h",
"$_src/gpu/tessellate/GrTessellationPathRenderer.cpp",
# v1
diff --git a/gn/tests.gni b/gn/tests.gni
index 4c6496e..75c158d 100644
--- a/gn/tests.gni
+++ b/gn/tests.gni
@@ -62,7 +62,6 @@
"$_tests/DiscardableMemoryPoolTest.cpp",
"$_tests/DiscardableMemoryTest.cpp",
"$_tests/DrawBitmapRectTest.cpp",
- "$_tests/DrawOpAtlasTest.cpp",
"$_tests/DrawPathTest.cpp",
"$_tests/DrawTextTest.cpp",
"$_tests/EmptyPathTest.cpp",
@@ -397,6 +396,7 @@
"$_tests/ClearTest.cpp",
"$_tests/DMSAATest.cpp",
"$_tests/DefaultPathRendererTest.cpp",
+ "$_tests/DrawOpAtlasTest.cpp",
"$_tests/GrClipStackTest.cpp",
"$_tests/GrMeshTest.cpp",
"$_tests/GrMipMappedTest.cpp",
diff --git a/src/core/SkGpuBlurUtils.h b/src/core/SkGpuBlurUtils.h
index 7a09154..01dd121 100644
--- a/src/core/SkGpuBlurUtils.h
+++ b/src/core/SkGpuBlurUtils.h
@@ -60,7 +60,7 @@
float sigmaY,
SkTileMode mode,
SkBackingFit fit = SkBackingFit::kApprox);
-#endif
+#endif // SK_GPU_V1
static const int kBlurRRectMaxDivisions = 6;
@@ -103,5 +103,6 @@
} // namespace SkGpuBlurUtils
-#endif
+#endif // SK_SUPPORT_GPU
+
#endif
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index bf034f7..9298588 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -43,8 +43,8 @@
#include "src/gpu/text/GrSDFTControl.h"
#include "src/image/SkSurface_Gpu.h"
-#include "src/gpu/GrOpsTask.h"
#if SK_GPU_V1
+#include "src/gpu/GrOpsTask.h"
#include "src/gpu/GrSoftwarePathRenderer.h"
#endif
@@ -370,7 +370,7 @@
return;
}
-#ifdef SK_DEBUG
+#if SK_GPU_V1 && defined(SK_DEBUG)
// This block checks for any unnecessary splits in the opsTasks. If two sequential opsTasks
// could have merged it means the opsTask was artificially split.
if (!fDAG.empty()) {
@@ -427,6 +427,7 @@
int newCount = 0;
for (int i = 0; i < fDAG.count(); i++) {
sk_sp<GrRenderTask>& task = fDAG[i];
+#if SK_GPU_V1
if (auto opsTask = task->asOpsTask()) {
size_t remaining = fDAG.size() - i - 1;
SkSpan<sk_sp<GrRenderTask>> nextTasks{fDAG.end() - remaining, remaining};
@@ -436,6 +437,7 @@
}
i += removeCount;
}
+#endif
fDAG[newCount++] = std::move(task);
}
fDAG.resize_back(newCount);
@@ -608,6 +610,7 @@
SkIPoint offset) {
SkDEBUGCODE(this->validate());
+#if SK_GPU_V1
if (fActiveOpsTask) {
// This is a temporary fix for the partial-MDB world. In that world we're not
// reordering so ops that (in the single opsTask world) would've just glommed onto the
@@ -616,6 +619,7 @@
fActiveOpsTask->makeClosed(fContext);
fActiveOpsTask = nullptr;
}
+#endif
// Propagate the DDL proxy's state information to the replay target.
if (ddl->priv().targetProxy()->isMSAADirty()) {
@@ -646,6 +650,7 @@
#ifdef SK_DEBUG
void GrDrawingManager::validate() const {
+#if SK_GPU_V1
if (fActiveOpsTask) {
SkASSERT(!fDAG.empty());
SkASSERT(!fActiveOpsTask->isClosed());
@@ -676,10 +681,12 @@
} else {
SkASSERT(fActiveOpsTask == nullptr);
}
+#endif // SK_GPU_V1
}
-#endif
+#endif // SK_DEBUG
void GrDrawingManager::closeActiveOpsTask() {
+#if SK_GPU_V1
if (fActiveOpsTask) {
// This is a temporary fix for the partial-MDB world. In that world we're not
// reordering so ops that (in the single opsTask world) would've just glommed onto the
@@ -688,8 +695,10 @@
fActiveOpsTask->makeClosed(fContext);
fActiveOpsTask = nullptr;
}
+#endif
}
+#if SK_GPU_V1
sk_sp<GrOpsTask> GrDrawingManager::newOpsTask(GrSurfaceProxyView surfaceView,
sk_sp<GrArenas> arenas,
bool flushTimeOpsTask) {
@@ -742,6 +751,7 @@
SkDEBUGCODE(this->validate());
}
+#endif // SK_GPU_V1
GrTextureResolveRenderTask* GrDrawingManager::newTextureResolveRenderTask(const GrCaps& caps) {
// Unlike in the "new opsTask" case, we do not want to close the active opsTask, nor (if we are
@@ -767,6 +777,7 @@
std::move(semaphores),
numSemaphores);
+#if SK_GPU_V1
if (fActiveOpsTask && (fActiveOpsTask->target(0) == proxy.get())) {
SkASSERT(this->getLastRenderTask(proxy.get()) == fActiveOpsTask);
this->insertTaskBeforeLast(waitTask);
@@ -784,7 +795,9 @@
// get a circular self dependency of waitTask on waitTask.
waitTask->addDependenciesFromOtherTask(fActiveOpsTask);
fActiveOpsTask->addDependency(waitTask.get());
- } else {
+ } else
+#endif
+ {
// In this case we just close the previous RenderTask and start and append the waitTask
// to the DAG. Since it is the last task now we call setLastRenderTask on the proxy. If
// there is a lastTask on the proxy we make waitTask depend on that task. This
diff --git a/src/gpu/GrDrawingManager.h b/src/gpu/GrDrawingManager.h
index b727899..af02f8c 100644
--- a/src/gpu/GrDrawingManager.h
+++ b/src/gpu/GrDrawingManager.h
@@ -48,6 +48,7 @@
void freeGpuResources();
+#if SK_GPU_V1
// OpsTasks created at flush time are stored and handled different from the others.
sk_sp<GrOpsTask> newOpsTask(GrSurfaceProxyView,
sk_sp<GrArenas> arenas,
@@ -58,6 +59,7 @@
// If 'previousAtlasTask' is provided, closes it and configures dependencies to guarantee
// previousAtlasTask and all its users are completely out of service before atlasTask executes.
void addAtlasTask(sk_sp<GrRenderTask> atlasTask, GrRenderTask* previousAtlasTask);
+#endif
// Create a render task that can resolve MSAA and/or regenerate mipmap levels on proxies. This
// method will only add the new render task to the list. It is up to the caller to call
diff --git a/src/gpu/GrResourceCache.h b/src/gpu/GrResourceCache.h
index 2d7f5c3..94a50ed 100644
--- a/src/gpu/GrResourceCache.h
+++ b/src/gpu/GrResourceCache.h
@@ -242,7 +242,6 @@
#if GR_TEST_UTILS
int countUniqueKeysWithTag(const char* tag) const;
- // This function is for unit testing and is only defined in test tools.
void changeTimestamp(uint32_t newTimestamp);
#endif
diff --git a/src/gpu/ops/GrLatticeOp.h b/src/gpu/ops/GrLatticeOp.h
index 559dbb0..4fa1053 100644
--- a/src/gpu/ops/GrLatticeOp.h
+++ b/src/gpu/ops/GrLatticeOp.h
@@ -5,8 +5,8 @@
* found in the LICENSE file.
*/
-#ifndef GLatticeOp_DEFINED
-#define GLatticeOp_DEFINED
+#ifndef GrLatticeOp_DEFINED
+#define GrLatticeOp_DEFINED
#include <memory>
#include "include/core/SkRefCnt.h"
diff --git a/src/gpu/tessellate/GrPathInnerTriangulateOp.cpp b/src/gpu/tessellate/GrPathInnerTriangulateOp.cpp
index 6dd596b..13229a0 100644
--- a/src/gpu/tessellate/GrPathInnerTriangulateOp.cpp
+++ b/src/gpu/tessellate/GrPathInnerTriangulateOp.cpp
@@ -417,8 +417,6 @@
}
void GrPathInnerTriangulateOp::onExecute(GrOpFlushState* flushState, const SkRect& chainBounds) {
- // TODO (robertphillips): remove guard once Ops are also V1-only
-#if SK_GPU_V1
if (fStencilCurvesProgram) {
SkASSERT(fTessellator);
flushState->bindPipelineAndScissorClip(*fStencilCurvesProgram, this->bounds());
@@ -442,5 +440,4 @@
flushState->bindTextures(fCoverHullsProgram->geomProc(), nullptr, *fPipelineForFills);
fTessellator->drawHullInstances(flushState, fHullVertexBufferIfNoIDSupport);
}
-#endif
}
diff --git a/src/gpu/tessellate/GrPathStencilCoverOp.cpp b/src/gpu/tessellate/GrPathStencilCoverOp.cpp
index 8d5d394..a638f65 100644
--- a/src/gpu/tessellate/GrPathStencilCoverOp.cpp
+++ b/src/gpu/tessellate/GrPathStencilCoverOp.cpp
@@ -303,8 +303,6 @@
}
void GrPathStencilCoverOp::onExecute(GrOpFlushState* flushState, const SkRect& chainBounds) {
- // TODO (robertphillips): remove guard once Ops are also V1-only
-#if SK_GPU_V1
if (!fTessellator) {
return;
}
@@ -334,5 +332,4 @@
flushState->bindBuffers(nullptr, fBBoxBuffer, fBBoxVertexBufferIfNoIDSupport);
flushState->drawInstanced(fPathCount, fBBoxBaseInstance, 4, 0);
}
-#endif
}
diff --git a/src/gpu/tessellate/GrPathTessellateOp.cpp b/src/gpu/tessellate/GrPathTessellateOp.cpp
index 267c149..140156a 100644
--- a/src/gpu/tessellate/GrPathTessellateOp.cpp
+++ b/src/gpu/tessellate/GrPathTessellateOp.cpp
@@ -69,8 +69,5 @@
flushState->bindTextures(fTessellationProgram->geomProc(), nullptr,
fTessellationProgram->pipeline());
- // TODO (robertphillips): remove guard once Ops are also V1-only
-#if SK_GPU_V1
fTessellator->draw(flushState);
-#endif
}
diff --git a/src/gpu/tessellate/GrStrokeTessellateOp.cpp b/src/gpu/tessellate/GrStrokeTessellateOp.cpp
index 0126917..88fac80 100644
--- a/src/gpu/tessellate/GrStrokeTessellateOp.cpp
+++ b/src/gpu/tessellate/GrStrokeTessellateOp.cpp
@@ -244,8 +244,6 @@
}
void GrStrokeTessellateOp::onExecute(GrOpFlushState* flushState, const SkRect& chainBounds) {
- // TODO (robertphillips): remove guard once Ops are also V1-only
-#if SK_GPU_V1
if (fStencilProgram) {
flushState->bindPipelineAndScissorClip(*fStencilProgram, chainBounds);
flushState->bindTextures(fStencilProgram->geomProc(), nullptr, fStencilProgram->pipeline());
@@ -256,5 +254,4 @@
flushState->bindTextures(fFillProgram->geomProc(), nullptr, fFillProgram->pipeline());
fTessellator->draw(flushState);
}
-#endif
}
diff --git a/src/gpu/text/GrTextBlob.cpp b/src/gpu/text/GrTextBlob.cpp
index 3979ce0..346ddaa 100644
--- a/src/gpu/text/GrTextBlob.cpp
+++ b/src/gpu/text/GrTextBlob.cpp
@@ -21,13 +21,13 @@
#include "src/gpu/SkGr.h"
#include "src/gpu/effects/GrDistanceFieldGeoProc.h"
#include "src/gpu/geometry/GrStyledShape.h"
-#include "src/gpu/ops/GrAtlasTextOp.h"
#include "src/gpu/text/GrAtlasManager.h"
#include "src/gpu/text/GrStrikeCache.h"
#include "src/gpu/text/GrTextBlob.h"
#if SK_GPU_V1
#include "src/gpu/GrBlurUtils.h"
+#include "src/gpu/ops/GrAtlasTextOp.h"
#include "src/gpu/v1/SurfaceDrawContext_v1.h"
#else
#include "src/gpu/SurfaceContext.h"
@@ -1711,8 +1711,10 @@
const SkRect fGlyphDeviceBounds;
const SkSpan<const DevicePosition> fLeftTopDevicePos;
+#if SK_GPU_V1
// Space for geometry
alignas(alignof(GrAtlasTextOp::Geometry)) char fGeom[sizeof(GrAtlasTextOp::Geometry)];
+#endif
// The regenerateAtlas method mutates fGlyphs. It should be called from onPrepare which must
// be single threaded.
@@ -1729,7 +1731,6 @@
, fGlyphs{glyphs} {
#if !SK_GPU_V1
(void) fGlyphDeviceBounds;
- (void) fGeom;
#endif
}
@@ -1962,8 +1963,10 @@
const SkRect fVertexBounds;
const SkSpan<const VertexData> fVertexData;
+#if SK_GPU_V1
// Space for geometry
alignas(alignof(GrAtlasTextOp::Geometry)) char fGeom[sizeof(GrAtlasTextOp::Geometry)];
+#endif
// The regenerateAtlas method mutates fGlyphs. It should be called from onPrepare which must
// be single threaded.
@@ -1978,9 +1981,6 @@
, fVertexBounds{bounds}
, fVertexData{vertexData}
, fGlyphs{glyphs} {
-#if !SK_GPU_V1
- (void) fGeom;
-#endif
}
GrAtlasSubRunOwner TransformedMaskSubRunNoCache::Make(
@@ -2191,8 +2191,10 @@
const SkRect fVertexBounds;
const SkSpan<const VertexData> fVertexData;
+#if SK_GPU_V1
// Space for geometry
alignas(alignof(GrAtlasTextOp::Geometry)) char fGeom[sizeof(GrAtlasTextOp::Geometry)];
+#endif
// The regenerateAtlas method mutates fGlyphs. It should be called from onPrepare which must
// be single threaded.
@@ -2215,7 +2217,6 @@
, fUseLCDText{useLCDText}
, fAntiAliased{antiAliased} {
#if !SK_GPU_V1
- (void) fGeom;
(void) fUseLCDText;
(void) fAntiAliased;
#endif
diff --git a/tools/debugger/DebugCanvas.cpp b/tools/debugger/DebugCanvas.cpp
index 1baf87d..2661939 100644
--- a/tools/debugger/DebugCanvas.cpp
+++ b/tools/debugger/DebugCanvas.cpp
@@ -304,7 +304,7 @@
at->fullReset();
}
}
-#endif
+#endif // SK_GPU_V1
void DebugCanvas::toJSON(SkJSONWriter& writer,
UrlDataManager& urlDataManager,