aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-06-23 14:07:00 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-23 14:07:00 -0700
commit28a838e532250fcca9673aca6c4616193a5a139d (patch)
tree3554ad76c7ce5f69d7ab200b3f2c52ba955827e0 /tools
parentb593a76749c6c7e12bf86aeaa06e1e52708e9bdf (diff)
Move GrPipelineBuilder out of gms & reduce use of GrPipelineBuilder.h
Just another step in reining in the GrPLB GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2086293006 Review-Url: https://codereview.chromium.org/2086293006
Diffstat (limited to 'tools')
-rw-r--r--tools/gpu/GrTest.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp
index dca47baea5..6a637efc61 100644
--- a/tools/gpu/GrTest.cpp
+++ b/tools/gpu/GrTest.cpp
@@ -234,19 +234,24 @@ void GrResourceCache::changeTimestamp(uint32_t newTimestamp) { fTimestamp = newT
SkDEBUGCODE(GrSingleOwner::AutoEnforce debug_SingleOwner(fDrawContext->fSingleOwner);)
#define RETURN_IF_ABANDONED if (fDrawContext->fDrawingManager->wasAbandoned()) { return; }
-void GrDrawContextPriv::testingOnly_drawBatch(const GrPipelineBuilder& pipelineBuilder,
+void GrDrawContextPriv::testingOnly_drawBatch(const GrPaint& paint,
GrDrawBatch* batch,
- const GrClip* clip) {
+ const GrUserStencilSettings* uss,
+ bool snapToCenters) {
ASSERT_SINGLE_OWNER
RETURN_IF_ABANDONED
SkDEBUGCODE(fDrawContext->validate();)
GR_AUDIT_TRAIL_AUTO_FRAME(fDrawContext->fAuditTrail, "GrDrawContext::testingOnly_drawBatch");
- if (clip) {
- fDrawContext->getDrawTarget()->drawBatch(pipelineBuilder, fDrawContext, *clip, batch);
- } else {
- fDrawContext->getDrawTarget()->drawBatch(pipelineBuilder, fDrawContext, GrNoClip(), batch);
+ GrPipelineBuilder pipelineBuilder(paint, fDrawContext->mustUseHWAA(paint));
+ if (uss) {
+ pipelineBuilder.setUserStencil(uss);
}
+ if (snapToCenters) {
+ pipelineBuilder.setState(GrPipelineBuilder::kSnapVerticesToPixelCenters_Flag, true);
+ }
+
+ fDrawContext->getDrawTarget()->drawBatch(pipelineBuilder, fDrawContext, GrNoClip(), batch);
}
#undef ASSERT_SINGLE_OWNER