Index: src/gpu/GrDrawTarget.cpp |
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp |
index e8a758d25f3346d4702fcf9febbe2538779a9abd..b89d70ea2be724e2a8fb5bff5e1f6364efd5f31d 100644 |
--- a/src/gpu/GrDrawTarget.cpp |
+++ b/src/gpu/GrDrawTarget.cpp |
@@ -6,9 +6,9 @@ |
* found in the LICENSE file. |
*/ |
- |
- |
#include "GrDrawTarget.h" |
+ |
+#include "GrBatch.h" |
#include "GrContext.h" |
#include "GrDrawTargetCaps.h" |
#include "GrPath.h" |
@@ -526,6 +526,29 @@ void GrDrawTarget::drawNonIndexed(GrPipelineBuilder* pipelineBuilder, |
} |
} |
+ |
+void GrDrawTarget::drawBatch(GrPipelineBuilder* pipelineBuilder, |
+ GrBatch* batch, |
+ const SkRect* devBounds) { |
+ SkASSERT(pipelineBuilder); |
+ // TODO some kind of checkdraw, but not at this level |
+ |
+ // Setup clip |
+ GrScissorState scissorState; |
+ GrPipelineBuilder::AutoRestoreEffects are; |
+ GrPipelineBuilder::AutoRestoreStencil ars; |
+ if (!this->setupClip(pipelineBuilder, &are, &ars, &scissorState, devBounds)) { |
+ return; |
+ } |
+ |
+ GrDeviceCoordTexture dstCopy; |
+ if (!this->setupDstReadIfNecessary(pipelineBuilder, &dstCopy, devBounds)) { |
+ return; |
+ } |
+ |
+ this->onDrawBatch(batch, *pipelineBuilder, scissorState, dstCopy.texture() ? &dstCopy : NULL); |
+} |
+ |
static const GrStencilSettings& winding_path_stencil_settings() { |
GR_STATIC_CONST_SAME_STENCIL_STRUCT(gSettings, |
kIncClamp_StencilOp, |