aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGpu.cpp
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/GrGpu.cpp
parent6028a8476504022fe40b6870b1460b5e4a80969f (diff)
Check for xfer barriers in GrBatch, auto-issue barriers in GrGpu
Diffstat (limited to 'src/gpu/GrGpu.cpp')
-rw-r--r--src/gpu/GrGpu.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 64016cf441..9c468e7f42 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -14,6 +14,7 @@
#include "GrGpuResourcePriv.h"
#include "GrIndexBuffer.h"
#include "GrPathRendering.h"
+#include "GrPipeline.h"
#include "GrResourceCache.h"
#include "GrRenderTargetPriv.h"
#include "GrStencilAttachment.h"
@@ -381,6 +382,10 @@ void GrGpu::removeGpuTraceMarker(const GrGpuTraceMarker* marker) {
void GrGpu::draw(const DrawArgs& args, const GrVertices& vertices) {
this->handleDirtyContext();
+ if (GrXferBarrierType barrierType = args.fPipeline->xferBarrierType(*this->caps())) {
+ this->xferBarrier(args.fPipeline->getRenderTarget(), barrierType);
+ }
+
GrVertices::Iterator iter;
const GrNonInstancedVertices* verts = iter.init(vertices);
do {