Delete GrSTArenaList
The intent of this class was to abstract the internal linked list used
by GrStrokeTessellateOp, but it seems to just make things more
complicated. We have a need now to iterate the list with more freedom
than is offered by GrSTArenaList, so it seems best to just use a plain
C-style linked list instead.
Bug: chromium:1172543
Change-Id: Ia76be83c523bd3c285200099a529ccd3818490b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372656
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
diff --git a/src/gpu/tessellate/GrStrokeTessellateOp.h b/src/gpu/tessellate/GrStrokeTessellateOp.h
index 819d69e..feb2f78 100644
--- a/src/gpu/tessellate/GrStrokeTessellateOp.h
+++ b/src/gpu/tessellate/GrStrokeTessellateOp.h
@@ -9,7 +9,6 @@
#define GrStrokeTessellateOp_DEFINED
#include "include/core/SkStrokeRec.h"
-#include "src/gpu/GrSTArenaList.h"
#include "src/gpu/ops/GrMeshDrawOp.h"
#include "src/gpu/tessellate/GrPathShader.h"
#include "src/gpu/tessellate/GrStrokeTessellateShader.h"
@@ -21,16 +20,17 @@
public:
using ShaderFlags = GrStrokeTessellateShader::ShaderFlags;
- struct PathStroke {
- PathStroke(const SkPath& path, const SkStrokeRec& stroke, const SkPMColor4f& color)
+ struct PathStrokeList {
+ PathStrokeList(const SkPath& path, const SkStrokeRec& stroke, const SkPMColor4f& color)
: fPath(path), fStroke(stroke), fColor(color) {}
SkPath fPath;
SkStrokeRec fStroke;
SkPMColor4f fColor;
+ PathStrokeList* fNext = nullptr;
};
- GrStrokeTessellator(ShaderFlags shaderFlags, GrSTArenaList<PathStroke>&& pathStrokeList)
- : fShaderFlags(shaderFlags), fPathStrokeList(std::move(pathStrokeList)) {}
+ GrStrokeTessellator(ShaderFlags shaderFlags, PathStrokeList* pathStrokeList)
+ : fShaderFlags(shaderFlags), fPathStrokeList(pathStrokeList) {}
// Called before draw(). Prepares GPU buffers containing the geometry to tessellate.
virtual void prepare(GrMeshDrawOp::Target*, const SkMatrix&) = 0;
@@ -43,7 +43,7 @@
protected:
const ShaderFlags fShaderFlags;
- const GrSTArenaList<PathStroke> fPathStrokeList;
+ PathStrokeList* fPathStrokeList;
};
// Renders strokes by linearizing them into sorted "parametric" and "radial" edges. See
@@ -54,11 +54,11 @@
private:
using ShaderFlags = GrStrokeTessellateShader::ShaderFlags;
- using PathStroke = GrStrokeTessellator::PathStroke;
+ using PathStrokeList = GrStrokeTessellator::PathStrokeList;
DEFINE_OP_CLASS_ID
- SkStrokeRec& headStroke() { return fPathStrokeList.head().fStroke; }
- SkPMColor4f& headColor() { return fPathStrokeList.head().fColor; }
+ SkStrokeRec& headStroke() { return fPathStrokeList.fStroke; }
+ SkPMColor4f& headColor() { return fPathStrokeList.fColor; }
GrStrokeTessellateOp* nextInChain() const {
return static_cast<GrStrokeTessellateOp*>(this->GrDrawOp::nextInChain());
}
@@ -103,7 +103,8 @@
const GrAAType fAAType;
const SkMatrix fViewMatrix;
ShaderFlags fShaderFlags = ShaderFlags::kNone;
- GrSTArenaList<PathStroke> fPathStrokeList;
+ PathStrokeList fPathStrokeList;
+ PathStrokeList** fPathStrokeTail = &fPathStrokeList.fNext;
int fTotalCombinedVerbCnt = 0;
GrProcessorSet fProcessors;
bool fNeedsStencil = false;