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

Unified Diff: tools/gpu/GrTest.cpp

Issue 2086293006: Move GrPipelineBuilder out of gms & reduce use of GrPipelineBuilder.h (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 4 years, 6 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 | « tests/PrimitiveProcessorTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gpu/GrTest.cpp
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp
index dca47baea5750e8952443ffe9e8825ed9fa6a706..6a637efc61f4d1913752236cea1724956b6892e3 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
« no previous file with comments | « tests/PrimitiveProcessorTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698