aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPathRendering.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-08-12 11:14:50 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-12 11:14:50 -0700
commitcb02b38b2c48bfde333ce3c699dd0451e2d867fa (patch)
treefe4c1f40874588934ae4b07405dcdc9fc456bfa8 /src/gpu/GrPathRendering.h
parent6028a8476504022fe40b6870b1460b5e4a80969f (diff)
Check for xfer barriers in GrBatch, auto-issue barriers in GrGpu
Diffstat (limited to 'src/gpu/GrPathRendering.h')
-rw-r--r--src/gpu/GrPathRendering.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gpu/GrPathRendering.h b/src/gpu/GrPathRendering.h
index 527a8430c5..f13a190829 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) {