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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 845103005: GrBatchPrototype (Closed) Base URL: https://skia.googlesource.com/skia.git@lc2
Patch Set: removing dstread Created 5 years, 11 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/GrDrawTarget.h ('k') | src/gpu/GrFlushToGpuDrawTarget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrFlushToGpuDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698