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

Unified Diff: src/gpu/GrPathRendering.h

Issue 1287973003: Check for xfer barriers in GrBatch, auto-issue barriers in GrGpu (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comment Created 5 years, 4 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/GrOvalRenderer.cpp ('k') | src/gpu/GrPipeline.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 527a8430c5ec8e35763d6514fd1ece52d2e5c943..f13a190829e8b48b4742f17c4b9ea6a8c96bd0ec 100644
--- a/src/gpu/GrPathRendering.h
+++ b/src/gpu/GrPathRendering.h
@@ -11,6 +11,7 @@
#include "SkPath.h"
#include "GrGpu.h"
#include "GrPathRange.h"
+#include "GrPipeline.h"
class SkDescriptor;
class SkTypeface;
@@ -166,6 +167,9 @@ public:
void drawPath(const DrawPathArgs& args, const GrPath* path) {
fGpu->handleDirtyContext();
+ if (GrXferBarrierType barrierType = args.fPipeline->xferBarrierType(*fGpu->caps())) {
+ fGpu->xferBarrier(args.fPipeline->getRenderTarget(), barrierType);
+ }
this->onDrawPath(args, path);
}
@@ -173,10 +177,14 @@ public:
PathIndexType indexType, const float transformValues[],
PathTransformType transformType, int count) {
fGpu->handleDirtyContext();
+ if (GrXferBarrierType barrierType = args.fPipeline->xferBarrierType(*fGpu->caps())) {
+ fGpu->xferBarrier(args.fPipeline->getRenderTarget(), barrierType);
+ }
pathRange->willDrawPaths(indices, indexType, count);
this->onDrawPaths(args, pathRange, indices, indexType, transformValues, transformType,
count);
}
+
protected:
GrPathRendering(GrGpu* gpu)
: fGpu(gpu) {
« no previous file with comments | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/GrPipeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698