diff options
author | 2016-04-25 07:01:22 -0700 | |
---|---|---|
committer | 2016-04-25 07:01:23 -0700 | |
commit | 1dc172165b8186950fda4a269bd1b12c11947b14 (patch) | |
tree | f1482ee0e2d88d139c990b212d479885df5d7c8a /src/gpu/GrPathRendering.h | |
parent | edf7fcd8b9e339800edb61ae422f8b6c1b77c3e8 (diff) |
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
Diffstat (limited to 'src/gpu/GrPathRendering.h')
-rw-r--r-- | src/gpu/GrPathRendering.h | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/src/gpu/GrPathRendering.h b/src/gpu/GrPathRendering.h index ca81b8f08f..8ee3d7b3e2 100644 --- a/src/gpu/GrPathRendering.h +++ b/src/gpu/GrPathRendering.h @@ -153,6 +153,17 @@ public: this->onStencilPath(args, path); } + void drawPath(const GrPipeline& pipeline, + const GrPrimitiveProcessor& primProc, + const GrStencilSettings& stencil, + const GrPath* path) { + fGpu->handleDirtyContext(); + if (GrXferBarrierType barrierType = pipeline.xferBarrierType(*fGpu->caps())) { + fGpu->xferBarrier(pipeline.getRenderTarget(), barrierType); + } + this->onDrawPath(pipeline, primProc, stencil, path); + } + void drawPaths(const GrPipeline& pipeline, const GrPrimitiveProcessor& primProc, const GrStencilSettings& stencil, @@ -173,23 +184,15 @@ public: transformValues, transformType, count); } - void drawPaths(const GrPipeline& pipeline, - const GrPrimitiveProcessor& primProc, - const GrStencilSettings& stencil, - const GrPath* const* paths, - int count) { - fGpu->handleDirtyContext(); - if (GrXferBarrierType barrierType = pipeline.xferBarrierType(*fGpu->caps())) { - fGpu->xferBarrier(pipeline.getRenderTarget(), barrierType); - } - this->onDrawPaths(pipeline, primProc, stencil, paths, count); - } - protected: GrPathRendering(GrGpu* gpu) : fGpu(gpu) { } virtual void onStencilPath(const StencilPathArgs&, const GrPath*) = 0; + virtual void onDrawPath(const GrPipeline&, + const GrPrimitiveProcessor&, + const GrStencilSettings&, + const GrPath*) = 0; virtual void onDrawPaths(const GrPipeline&, const GrPrimitiveProcessor&, const GrStencilSettings&, @@ -199,11 +202,6 @@ protected: const float transformValues[], PathTransformType, int count) = 0; - virtual void onDrawPaths(const GrPipeline&, - const GrPrimitiveProcessor&, - const GrStencilSettings&, - const GrPath* const*, - int count) = 0; GrGpu* fGpu; private: |