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

Unified Diff: src/gpu/batches/GrDashLinePathRenderer.cpp

Issue 2092893003: Retract PipelineBuilder some more (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 4 years, 5 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/batches/GrAALinearizingConvexPathRenderer.cpp ('k') | src/gpu/batches/GrDefaultPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrDashLinePathRenderer.cpp
diff --git a/src/gpu/batches/GrDashLinePathRenderer.cpp b/src/gpu/batches/GrDashLinePathRenderer.cpp
index f2b75be1081bef6048b115c21686522578e30e8b..b948fbcd94c3c06549b5f68d4007dcbbfbea10b3 100644
--- a/src/gpu/batches/GrDashLinePathRenderer.cpp
+++ b/src/gpu/batches/GrDashLinePathRenderer.cpp
@@ -9,7 +9,6 @@
#include "GrAuditTrail.h"
#include "GrGpu.h"
-#include "GrPipelineBuilder.h"
#include "effects/GrDashingEffect.h"
bool GrDashLinePathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
@@ -26,9 +25,15 @@ bool GrDashLinePathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
bool GrDashLinePathRenderer::onDrawPath(const DrawPathArgs& args) {
GR_AUDIT_TRAIL_AUTO_FRAME(args.fDrawContext->auditTrail(),
"GrDashLinePathRenderer::onDrawPath");
+
+ SkTCopyOnFirstWrite<GrPaint> paint(*args.fPaint);
+
bool useHWAA = args.fDrawContext->isUnifiedMultisampled();
GrDashingEffect::AAMode aaMode;
if (useHWAA) {
+ if (!paint->isAntiAlias()) {
+ paint.writable()->setAntiAlias(true);
+ }
// We ignore args.fAntiAlias here and force anti aliasing when using MSAA. Otherwise,
// we can wind up with external edges antialiased and internal edges unantialiased.
aaMode = GrDashingEffect::AAMode::kCoverageWithMSAA;
@@ -48,9 +53,7 @@ bool GrDashLinePathRenderer::onDrawPath(const DrawPathArgs& args) {
return false;
}
- GrPipelineBuilder pipelineBuilder(*args.fPaint, useHWAA);
- pipelineBuilder.setUserStencil(args.fUserStencilSettings);
-
- args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch);
+ SkASSERT(args.fDrawContext->mustUseHWAA(*paint) == useHWAA);
+ args.fDrawContext->drawBatch(*paint, *args.fClip, *args.fUserStencilSettings, batch);
return true;
}
« no previous file with comments | « src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp ('k') | src/gpu/batches/GrDefaultPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698