Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Unified Diff: src/gpu/GrPathRendering.h

Issue 1908433002: Batch multiple single NVPR draw paths to instanced draws Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address review comments Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrPath.h ('k') | src/gpu/batches/GrBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPathRendering.h
diff --git a/src/gpu/GrPathRendering.h b/src/gpu/GrPathRendering.h
index 8ee3d7b3e24168e5640b6f9ee3055852a2f1a92e..ca81b8f08fec285cd26f09961930d8cb9877893f 100644
--- a/src/gpu/GrPathRendering.h
+++ b/src/gpu/GrPathRendering.h
@@ -153,17 +153,6 @@ 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,
@@ -184,15 +173,23 @@ 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&,
@@ -202,6 +199,11 @@ 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:
« no previous file with comments | « src/gpu/GrPath.h ('k') | src/gpu/batches/GrBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698