Revert of Batch multiple single NVPR draw paths to instanced draws (patchset #5 id:80001 of https://codereview.chromium.org/1908433002/ )
Reason for revert:
This causes what looks like significantly wrong results. Here is an example:
https://gold.skia.org/diff?test=stroke-fill&left=cb47dc2cabbad7d146aedaac199ebace&top=2c6e65d597c574e3bb170a19ca9634c6
Original issue's description:
> Batch multiple single NVPR draw paths to instanced draws
>
> Batch multiple single NVPR draw paths to instanced draws.
> A draw path batch can be combined to other batch if the
> batches do not overlap and have same draw characteristics.
>
> Join the batches in linked list and flatten the list to a
> path list during draw time.
>
> Replace GrPathRendering::drawPath with GrPathRendering::drawPaths.
>
> Perf changes ARM, Shield TV device, Tegra X1 GPU:
> desk_chalkboard.skp_1 21.5ms -> 17.8ms 0.83x
> desk_mapsvg.skp_1 7.49ms -> 6.18ms 0.82x
> Others results are more volatile.
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1908433002
>
> Committed: https://skia.googlesource.com/skia/+/3c33c389e9f8d14d86756ea1ddeba2097f31ad22
TBR=joshualitt@chromium.org,bsalomon@google.com,kkinnunen@nvidia.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1919843002
diff --git a/src/gpu/batches/GrDrawPathBatch.h b/src/gpu/batches/GrDrawPathBatch.h
index 6d5c69a..d29d046 100644
--- a/src/gpu/batches/GrDrawPathBatch.h
+++ b/src/gpu/batches/GrDrawPathBatch.h
@@ -76,26 +76,19 @@
GrDrawPathBatch(const SkMatrix& viewMatrix, GrColor color, GrPathRendering::FillType fill,
const GrPath* path)
: INHERITED(ClassID(), viewMatrix, color, fill)
- , fPath(path)
- , fNext(nullptr)
- , fLastSlot(&fNext)
- , fTotalPathCount(1) {
+ , fPath(path) {
fBounds = path->getBounds();
viewMatrix.mapRect(&fBounds);
- fPathBounds = fBounds;
}
- static bool ListBoundsIntersects(const GrDrawPathBatch* a, const GrDrawPathBatch* b);
- bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override;
+
+ bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override { return false; }
void onPrepare(GrBatchFlushState*) override {}
void onDraw(GrBatchFlushState* state) override;
GrPendingIOResource<const GrPath, kRead_GrIOType> fPath;
- SkRect fPathBounds;
- sk_sp<GrDrawPathBatch> fNext; // Batch union is made with a linked list of batch nodes.
- sk_sp<GrDrawPathBatch>* fLastSlot; // Points to the fNext of the last batch in the batch list.
- int fTotalPathCount;
+
typedef GrDrawPathBatchBase INHERITED;
};