GrBatchPrototype
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/d15e4e45374275c045572b304c229237c4a82be4
Committed: https://skia.googlesource.com/skia/+/d5a7db4a867c7e6ccf8451a053d987b470099198
Review URL: https://codereview.chromium.org/845103005
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index e8a758d..b89d70e 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::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,