use SkArenaAlloc for combineIfPossible
Now that GrOps no longer needs a GrMemoryPool to be deleted, just pass down the the SkArenaAlloc instead of both the GrMemoryPool and SkArenaAlloc. The alloc is only used for two ops, but we pass it to all the ops most of which don't use it. Change-Id: I873efcdfe44b446f2ac5089ea8425dff257e318c Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330118 Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Herb Derby <herb@google.com>
This commit is contained in:
parent
541601602e
commit
e25c30034a
@ -188,7 +188,8 @@ GrOpsTask::OpChain::List GrOpsTask::OpChain::DoConcat(
|
||||
bool canForwardMerge =
|
||||
(a == chainA.tail()) || can_reorder(a->bounds(), forwardMergeBounds);
|
||||
if (canForwardMerge || canBackwardMerge) {
|
||||
auto result = a->combineIfPossible(chainB.head(), arenas, caps);
|
||||
auto result = a->combineIfPossible(
|
||||
chainB.head(), arenas->recordTimeAllocator(), caps);
|
||||
SkASSERT(result != GrOp::CombineResult::kCannotCombine);
|
||||
merged = (result == GrOp::CombineResult::kMerged);
|
||||
GrOP_INFO("\t\t: (%s opID: %u) -> Combining with (%s, opID: %u)\n",
|
||||
@ -265,7 +266,8 @@ bool GrOpsTask::OpChain::tryConcat(
|
||||
|
||||
SkDEBUGCODE(bool first = true;)
|
||||
do {
|
||||
switch (fList.tail()->combineIfPossible(list->head(), arenas, caps)) {
|
||||
switch (fList.tail()->combineIfPossible(list->head(), arenas->recordTimeAllocator(), caps))
|
||||
{
|
||||
case GrOp::CombineResult::kCannotCombine:
|
||||
// If an op supports chaining then it is required that chaining is transitive and
|
||||
// that if any two ops in two different chains can merge then the two chains
|
||||
|
@ -191,8 +191,7 @@ GrProcessorSet::Analysis GrCCDrawPathsOp::SingleDraw::finalize(
|
||||
return analysis;
|
||||
}
|
||||
|
||||
GrOp::CombineResult GrCCDrawPathsOp::onCombineIfPossible(GrOp* op, GrRecordingContext::Arenas*,
|
||||
const GrCaps&) {
|
||||
GrOp::CombineResult GrCCDrawPathsOp::onCombineIfPossible(GrOp* op, SkArenaAlloc*, const GrCaps&) {
|
||||
GrCCDrawPathsOp* that = op->cast<GrCCDrawPathsOp>();
|
||||
SkASSERT(fOwningPerOpsTaskPaths);
|
||||
SkASSERT(fNumDraws);
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
FixedFunctionFlags fixedFunctionFlags() const override { return FixedFunctionFlags::kNone; }
|
||||
GrProcessorSet::Analysis finalize(const GrCaps&, const GrAppliedClip*,
|
||||
bool hasMixedSampledCoverage, GrClampType) override;
|
||||
CombineResult onCombineIfPossible(GrOp*, GrRecordingContext::Arenas*, const GrCaps&) override;
|
||||
CombineResult onCombineIfPossible(GrOp*, SkArenaAlloc*, const GrCaps&) override;
|
||||
void visitProxies(const VisitProxyFunc& fn) const override {
|
||||
for (const auto& range : fInstanceRanges) {
|
||||
fn(range.fAtlasProxy, GrMipmapped::kNo);
|
||||
|
@ -38,8 +38,7 @@ public:
|
||||
bool hasMixedSampledCoverage, GrClampType) override {
|
||||
return GrProcessorSet::EmptySetAnalysis();
|
||||
}
|
||||
CombineResult onCombineIfPossible(GrOp* other, GrRecordingContext::Arenas*,
|
||||
const GrCaps&) override {
|
||||
CombineResult onCombineIfPossible(GrOp* other, SkArenaAlloc*, const GrCaps&) override {
|
||||
// We will only make multiple copy ops if they have different source proxies.
|
||||
// TODO: make use of texture chaining.
|
||||
return CombineResult::kCannotCombine;
|
||||
|
@ -40,8 +40,7 @@ public:
|
||||
bool hasMixedSampledCoverage, GrClampType) override {
|
||||
return GrProcessorSet::EmptySetAnalysis();
|
||||
}
|
||||
CombineResult onCombineIfPossible(GrOp* other, GrRecordingContext::Arenas*,
|
||||
const GrCaps&) override {
|
||||
CombineResult onCombineIfPossible(GrOp* other, SkArenaAlloc*, const GrCaps&) override {
|
||||
// We will only make multiple copy ops if they have different source proxies.
|
||||
// TODO: make use of texture chaining.
|
||||
return CombineResult::kCannotCombine;
|
||||
|
@ -860,8 +860,7 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) override {
|
||||
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps) override {
|
||||
AAConvexPathOp* that = t->cast<AAConvexPathOp>();
|
||||
if (!fHelper.isCompatible(that->fHelper, caps, this->bounds(), that->bounds())) {
|
||||
return CombineResult::kCannotCombine;
|
||||
|
@ -920,8 +920,7 @@ private:
|
||||
typedef SkTArray<int, true> IntArray;
|
||||
typedef SkTArray<float, true> FloatArray;
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) override {
|
||||
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps) override {
|
||||
AAHairlineOp* that = t->cast<AAHairlineOp>();
|
||||
|
||||
if (!fHelper.isCompatible(that->fHelper, caps, this->bounds(), that->bounds())) {
|
||||
|
@ -339,8 +339,7 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) override {
|
||||
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps) override {
|
||||
AAFlatteningConvexPathOp* that = t->cast<AAFlatteningConvexPathOp>();
|
||||
if (!fHelper.isCompatible(that->fHelper, caps, this->bounds(), that->bounds())) {
|
||||
return CombineResult::kCannotCombine;
|
||||
|
@ -332,8 +332,7 @@ void GrAtlasTextOp::createDrawForGeneratedGlyphs(
|
||||
++flushInfo->fNumDraws;
|
||||
}
|
||||
|
||||
GrOp::CombineResult GrAtlasTextOp::onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) {
|
||||
GrOp::CombineResult GrAtlasTextOp::onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps) {
|
||||
GrAtlasTextOp* that = t->cast<GrAtlasTextOp>();
|
||||
if (fProcessors != that->fProcessors) {
|
||||
return CombineResult::kCannotCombine;
|
||||
|
@ -170,8 +170,7 @@ private:
|
||||
bool usesLocalCoords() const { return fUsesLocalCoords; }
|
||||
int numGlyphs() const { return fNumGlyphs; }
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) override;
|
||||
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps) override;
|
||||
|
||||
GrGeometryProcessor* setupDfProcessor(SkArenaAlloc*,
|
||||
const GrShaderCaps&,
|
||||
|
@ -40,8 +40,7 @@ GrClearOp::GrClearOp(Buffer buffer, const GrScissorState& scissor,
|
||||
this->setBounds(SkRect::Make(scissor.rect()), HasAABloat::kNo, IsHairline::kNo);
|
||||
}
|
||||
|
||||
GrOp::CombineResult GrClearOp::onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) {
|
||||
GrOp::CombineResult GrClearOp::onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps) {
|
||||
GrClearOp* other = t->cast<GrClearOp>();
|
||||
|
||||
if (other->fBuffer == fBuffer) {
|
||||
|
@ -43,8 +43,7 @@ private:
|
||||
|
||||
GrClearOp(Buffer buffer, const GrScissorState& scissor, const SkPMColor4f& color, bool stencil);
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) override;
|
||||
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps) override;
|
||||
|
||||
void onPrePrepare(GrRecordingContext*, const GrSurfaceProxyView* writeView, GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&,
|
||||
|
@ -663,8 +663,7 @@ private:
|
||||
flushState->drawMesh(*fMesh);
|
||||
}
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) override {
|
||||
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps) override {
|
||||
DashOp* that = t->cast<DashOp>();
|
||||
if (fProcessorSet != that->fProcessorSet) {
|
||||
return CombineResult::kCannotCombine;
|
||||
|
@ -471,8 +471,7 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) override {
|
||||
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps) override {
|
||||
DefaultPathOp* that = t->cast<DefaultPathOp>();
|
||||
if (!fHelper.isCompatible(that->fHelper, caps, this->bounds(), that->bounds())) {
|
||||
return CombineResult::kCannotCombine;
|
||||
|
@ -70,7 +70,7 @@ private:
|
||||
bool hasColors() const { return fHasColors; }
|
||||
int quadCount() const { return fQuadCount; }
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*, const GrCaps&) override;
|
||||
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps&) override;
|
||||
|
||||
struct Geometry {
|
||||
SkPMColor4f fColor;
|
||||
@ -253,8 +253,7 @@ void DrawAtlasOp::onExecute(GrOpFlushState* flushState, const SkRect& chainBound
|
||||
flushState->drawMesh(*fMesh);
|
||||
}
|
||||
|
||||
GrOp::CombineResult DrawAtlasOp::onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) {
|
||||
GrOp::CombineResult DrawAtlasOp::onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps) {
|
||||
DrawAtlasOp* that = t->cast<DrawAtlasOp>();
|
||||
|
||||
if (!fHelper.isCompatible(that->fHelper, caps, this->bounds(), that->bounds())) {
|
||||
|
@ -485,7 +485,7 @@ private:
|
||||
GrPrimitiveType::kPoints == fPrimitiveType;
|
||||
}
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*, const GrCaps&) override;
|
||||
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps&) override;
|
||||
|
||||
struct Mesh {
|
||||
SkPMColor4f fColor; // Used if this->hasPerVertexColors() is false.
|
||||
@ -741,8 +741,8 @@ void DrawVerticesOp::onExecute(GrOpFlushState* flushState, const SkRect& chainBo
|
||||
flushState->drawMesh(*fMesh);
|
||||
}
|
||||
|
||||
GrOp::CombineResult DrawVerticesOp::onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) {
|
||||
GrOp::CombineResult DrawVerticesOp::onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps)
|
||||
{
|
||||
DrawVerticesOp* that = t->cast<DrawVerticesOp>();
|
||||
|
||||
if (!fHelper.isCompatible(that->fHelper, caps, this->bounds(), that->bounds())) {
|
||||
|
@ -31,8 +31,7 @@ private:
|
||||
|
||||
GrDrawableOp(std::unique_ptr<SkDrawable::GpuDrawHandler>, const SkRect& bounds);
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* that, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) override {
|
||||
CombineResult onCombineIfPossible(GrOp* that, SkArenaAlloc*, const GrCaps& caps) override {
|
||||
return CombineResult::kCannotCombine;
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
|
||||
GrProcessorSet::Analysis finalize(const GrCaps&, const GrAppliedClip*,
|
||||
bool hasMixedSampledCoverage, GrClampType) final;
|
||||
CombineResult onCombineIfPossible(GrOp*, GrRecordingContext::Arenas*, const GrCaps&) final;
|
||||
CombineResult onCombineIfPossible(GrOp*, SkArenaAlloc*, const GrCaps&) final;
|
||||
|
||||
void visitProxies(const VisitProxyFunc& fn) const override {
|
||||
if (fProgramInfo) {
|
||||
@ -278,9 +278,7 @@ GrProcessorSet::Analysis FillRRectOp::finalize(
|
||||
return analysis;
|
||||
}
|
||||
|
||||
GrDrawOp::CombineResult FillRRectOp::onCombineIfPossible(GrOp* op,
|
||||
GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) {
|
||||
GrOp::CombineResult FillRRectOp::onCombineIfPossible(GrOp* op, SkArenaAlloc*, const GrCaps& caps) {
|
||||
const auto& that = *op->cast<FillRRectOp>();
|
||||
if (!fHelper.isCompatible(that.fHelper, caps, this->bounds(), that.bounds())) {
|
||||
return CombineResult::kCannotCombine;
|
||||
|
@ -318,8 +318,7 @@ private:
|
||||
fQuads.count(), totalNumVertices, fBaseVertex);
|
||||
}
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) override {
|
||||
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps) override {
|
||||
TRACE_EVENT0("skia.gpu", TRACE_FUNC);
|
||||
const auto* that = t->cast<FillRectOp>();
|
||||
|
||||
|
@ -306,8 +306,7 @@ private:
|
||||
flushState->drawMesh(*fMesh);
|
||||
}
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) override {
|
||||
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps) override {
|
||||
NonAALatticeOp* that = t->cast<NonAALatticeOp>();
|
||||
if (fView != that->fView) {
|
||||
return CombineResult::kCannotCombine;
|
||||
|
@ -39,13 +39,12 @@ GrOp::GrOp(uint32_t classID) : fClassID(classID) {
|
||||
SkDEBUGCODE(fBoundsFlags = kUninitialized_BoundsFlag);
|
||||
}
|
||||
|
||||
GrOp::CombineResult GrOp::combineIfPossible(GrOp* that, GrRecordingContext::Arenas* arenas,
|
||||
const GrCaps& caps) {
|
||||
GrOp::CombineResult GrOp::combineIfPossible(GrOp* that, SkArenaAlloc* alloc, const GrCaps& caps) {
|
||||
SkASSERT(this != that);
|
||||
if (this->classID() != that->classID()) {
|
||||
return CombineResult::kCannotCombine;
|
||||
}
|
||||
auto result = this->onCombineIfPossible(that, arenas, caps);
|
||||
auto result = this->onCombineIfPossible(that, alloc, caps);
|
||||
if (result == CombineResult::kMerged) {
|
||||
this->joinBounds(*that);
|
||||
}
|
||||
|
@ -139,8 +139,7 @@ public:
|
||||
};
|
||||
|
||||
// The arenas are the same as what was available when the op was created.
|
||||
CombineResult combineIfPossible(GrOp* that, GrRecordingContext::Arenas* arena,
|
||||
const GrCaps& caps);
|
||||
CombineResult combineIfPossible(GrOp* that, SkArenaAlloc* alloc, const GrCaps& caps);
|
||||
|
||||
const SkRect& bounds() const {
|
||||
SkASSERT(kUninitialized_BoundsFlag != fBoundsFlags);
|
||||
@ -336,7 +335,7 @@ private:
|
||||
return fBounds.joinPossiblyEmptyRect(that.fBounds);
|
||||
}
|
||||
|
||||
virtual CombineResult onCombineIfPossible(GrOp*, GrRecordingContext::Arenas*, const GrCaps&) {
|
||||
virtual CombineResult onCombineIfPossible(GrOp*, SkArenaAlloc*, const GrCaps&) {
|
||||
return CombineResult::kCannotCombine;
|
||||
}
|
||||
|
||||
|
@ -1399,8 +1399,7 @@ private:
|
||||
flushState->drawMesh(*fMesh);
|
||||
}
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) override {
|
||||
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps) override {
|
||||
CircleOp* that = t->cast<CircleOp>();
|
||||
|
||||
// can only represent 65535 unique vertices with 16-bit indices
|
||||
@ -1721,8 +1720,7 @@ private:
|
||||
flushState->drawMesh(*fMesh);
|
||||
}
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) override {
|
||||
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps) override {
|
||||
ButtCapDashedCircleOp* that = t->cast<ButtCapDashedCircleOp>();
|
||||
|
||||
// can only represent 65535 unique vertices with 16-bit indices
|
||||
@ -2012,8 +2010,7 @@ private:
|
||||
flushState->drawMesh(*fMesh);
|
||||
}
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) override {
|
||||
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps) override {
|
||||
EllipseOp* that = t->cast<EllipseOp>();
|
||||
|
||||
if (!fHelper.isCompatible(that->fHelper, caps, this->bounds(), that->bounds())) {
|
||||
@ -2278,8 +2275,7 @@ private:
|
||||
flushState->drawMesh(*fMesh);
|
||||
}
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) override {
|
||||
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps) override {
|
||||
DIEllipseOp* that = t->cast<DIEllipseOp>();
|
||||
if (!fHelper.isCompatible(that->fHelper, caps, this->bounds(), that->bounds())) {
|
||||
return CombineResult::kCannotCombine;
|
||||
@ -2739,8 +2735,7 @@ private:
|
||||
flushState->drawMesh(*fMesh);
|
||||
}
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) override {
|
||||
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps) override {
|
||||
CircularRRectOp* that = t->cast<CircularRRectOp>();
|
||||
|
||||
// can only represent 65535 unique vertices with 16-bit indices
|
||||
@ -3054,8 +3049,7 @@ private:
|
||||
flushState->drawMesh(*fMesh);
|
||||
}
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) override {
|
||||
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps) override {
|
||||
EllipticalRRectOp* that = t->cast<EllipticalRRectOp>();
|
||||
|
||||
if (!fHelper.isCompatible(that->fHelper, caps, this->bounds(), that->bounds())) {
|
||||
|
@ -152,8 +152,7 @@ private:
|
||||
flushState->drawMesh(*fMesh);
|
||||
}
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) override {
|
||||
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps) override {
|
||||
RegionOp* that = t->cast<RegionOp>();
|
||||
if (!fHelper.isCompatible(that->fHelper, caps, this->bounds(), that->bounds())) {
|
||||
return CombineResult::kCannotCombine;
|
||||
|
@ -614,8 +614,7 @@ private:
|
||||
flushState->drawMesh(*fMesh);
|
||||
}
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) override {
|
||||
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps) override {
|
||||
ShadowCircularRRectOp* that = t->cast<ShadowCircularRRectOp>();
|
||||
fGeoData.push_back_n(that->fGeoData.count(), that->fGeoData.begin());
|
||||
fVertCount += that->fVertCount;
|
||||
|
@ -621,8 +621,7 @@ private:
|
||||
const SkPMColor4f& color() const { return fShapes[0].fColor; }
|
||||
bool usesDistanceField() const { return fUsesDistanceField; }
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) override {
|
||||
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps) override {
|
||||
SmallPathOp* that = t->cast<SmallPathOp>();
|
||||
if (!fHelper.isCompatible(that->fHelper, caps, this->bounds(), that->bounds())) {
|
||||
return CombineResult::kCannotCombine;
|
||||
|
@ -480,7 +480,7 @@ private:
|
||||
const SkMatrix& viewMatrix() const { return fViewMatrix; }
|
||||
bool miterStroke() const { return fMiterStroke; }
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*, const GrCaps&) override;
|
||||
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps&) override;
|
||||
|
||||
void generateAAStrokeRectGeometry(GrVertexWriter& vertices,
|
||||
const SkPMColor4f& color,
|
||||
@ -692,8 +692,8 @@ sk_sp<const GrGpuBuffer> AAStrokeRectOp::GetIndexBuffer(GrResourceProvider* reso
|
||||
}
|
||||
}
|
||||
|
||||
GrOp::CombineResult AAStrokeRectOp::onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) {
|
||||
GrOp::CombineResult AAStrokeRectOp::onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps)
|
||||
{
|
||||
AAStrokeRectOp* that = t->cast<AAStrokeRectOp>();
|
||||
|
||||
if (!fHelper.isCompatible(that->fHelper, caps, this->bounds(), that->bounds())) {
|
||||
|
@ -958,8 +958,7 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas*,
|
||||
const GrCaps& caps) override {
|
||||
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc*, const GrCaps& caps) override {
|
||||
TRACE_EVENT0("skia.gpu", TRACE_FUNC);
|
||||
auto* that = t->cast<TextureOp>();
|
||||
|
||||
|
@ -124,7 +124,7 @@ GrProcessorSet::Analysis GrDrawAtlasPathOp::finalize(const GrCaps& caps, const G
|
||||
}
|
||||
|
||||
GrOp::CombineResult GrDrawAtlasPathOp::onCombineIfPossible(
|
||||
GrOp* op, GrRecordingContext::Arenas* arenas, const GrCaps&) {
|
||||
GrOp* op, SkArenaAlloc* alloc, const GrCaps&) {
|
||||
auto* that = op->cast<GrDrawAtlasPathOp>();
|
||||
SkASSERT(fAtlasProxy == that->fAtlasProxy);
|
||||
SkASSERT(fEnableHWAA == that->fEnableHWAA);
|
||||
@ -134,7 +134,7 @@ GrOp::CombineResult GrDrawAtlasPathOp::onCombineIfPossible(
|
||||
}
|
||||
|
||||
SkASSERT(fUsesLocalCoords == that->fUsesLocalCoords);
|
||||
auto* copy = arenas->recordTimeAllocator()->make<InstanceList>(that->fInstanceList);
|
||||
auto* copy = alloc->make<InstanceList>(that->fInstanceList);
|
||||
*fInstanceTail = copy;
|
||||
fInstanceTail = (!copy->fNext) ? ©->fNext : that->fInstanceTail;
|
||||
fInstanceCount += that->fInstanceCount;
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
}
|
||||
GrProcessorSet::Analysis finalize(const GrCaps&, const GrAppliedClip*,
|
||||
bool hasMixedSampledCoverage, GrClampType) override;
|
||||
CombineResult onCombineIfPossible(GrOp*, GrRecordingContext::Arenas*, const GrCaps&) override;
|
||||
CombineResult onCombineIfPossible(GrOp*, SkArenaAlloc*, const GrCaps&) override;
|
||||
void onPrepare(GrOpFlushState*) override;
|
||||
void onExecute(GrOpFlushState*, const SkRect& chainBounds) override;
|
||||
|
||||
|
@ -62,7 +62,7 @@ GrProcessorSet::Analysis GrStrokeTessellateOp::finalize(const GrCaps& caps,
|
||||
}
|
||||
|
||||
GrOp::CombineResult GrStrokeTessellateOp::onCombineIfPossible(GrOp* grOp,
|
||||
GrRecordingContext::Arenas* arenas,
|
||||
SkArenaAlloc* alloc,
|
||||
const GrCaps&) {
|
||||
auto* op = grOp->cast<GrStrokeTessellateOp>();
|
||||
if (fColor != op->fColor ||
|
||||
@ -73,7 +73,7 @@ GrOp::CombineResult GrStrokeTessellateOp::onCombineIfPossible(GrOp* grOp,
|
||||
return CombineResult::kCannotCombine;
|
||||
}
|
||||
|
||||
fPaths.concat(std::move(op->fPaths), arenas->recordTimeAllocator());
|
||||
fPaths.concat(std::move(op->fPaths), alloc);
|
||||
fTotalCombinedVerbCnt += op->fTotalCombinedVerbCnt;
|
||||
|
||||
return CombineResult::kMerged;
|
||||
|
@ -33,7 +33,7 @@ private:
|
||||
FixedFunctionFlags fixedFunctionFlags() const override;
|
||||
GrProcessorSet::Analysis finalize(const GrCaps&, const GrAppliedClip*,
|
||||
bool hasMixedSampledCoverage, GrClampType) override;
|
||||
CombineResult onCombineIfPossible(GrOp*, GrRecordingContext::Arenas*, const GrCaps&) override;
|
||||
CombineResult onCombineIfPossible(GrOp*, SkArenaAlloc*, const GrCaps&) override;
|
||||
void onPrePrepare(GrRecordingContext*, const GrSurfaceProxyView*, GrAppliedClip*,
|
||||
const GrXferProcessor::DstProxyView&, GrXferBarrierFlags) override;
|
||||
void onPrepare(GrOpFlushState* state) override;
|
||||
|
@ -138,8 +138,7 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
CombineResult onCombineIfPossible(GrOp* t, GrRecordingContext::Arenas* arenas,
|
||||
const GrCaps&) override {
|
||||
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc* arenas, const GrCaps&) override {
|
||||
// This op doesn't use the arenas, but make sure the GrOpsTask is sending it
|
||||
SkASSERT(arenas);
|
||||
(void) arenas;
|
||||
|
Loading…
Reference in New Issue
Block a user