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

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

Issue 2035823002: Make GrClipMaskManager stateless and push GrPipelineBuilder construction downstack (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address code review comments 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
Index: src/gpu/batches/GrTessellatingPathRenderer.cpp
diff --git a/src/gpu/batches/GrTessellatingPathRenderer.cpp b/src/gpu/batches/GrTessellatingPathRenderer.cpp
index e697f78d7218e2a6d36f8c06f3b0fce3ce1c69be..e02543505c3ed1ab52065cd85c75709841a4ebcf 100644
--- a/src/gpu/batches/GrTessellatingPathRenderer.cpp
+++ b/src/gpu/batches/GrTessellatingPathRenderer.cpp
@@ -7,8 +7,10 @@
#include "GrTessellatingPathRenderer.h"
+#include "GrAuditTrail.h"
#include "GrBatchFlushState.h"
#include "GrBatchTest.h"
+#include "GrClip.h"
#include "GrDefaultGeoProcFactory.h"
#include "GrMesh.h"
#include "GrPathUtils.h"
@@ -278,16 +280,13 @@ private:
};
bool GrTessellatingPathRenderer::onDrawPath(const DrawPathArgs& args) {
- GR_AUDIT_TRAIL_AUTO_FRAME(args.fTarget->getAuditTrail(),
+ GR_AUDIT_TRAIL_AUTO_FRAME(args.fDrawContext->auditTrail(),
"GrTessellatingPathRenderer::onDrawPath");
SkASSERT(!args.fAntiAlias);
- const GrRenderTarget* rt = args.fPipelineBuilder->getRenderTarget();
- if (nullptr == rt) {
- return false;
- }
SkIRect clipBoundsI;
- args.fClip->getConservativeBounds(rt->width(), rt->height(), &clipBoundsI);
+ args.fClip->getConservativeBounds(args.fDrawContext->width(), args.fDrawContext->height(),
+ &clipBoundsI);
SkRect clipBounds = SkRect::Make(clipBoundsI);
SkMatrix vmi;
if (!args.fViewMatrix->invert(&vmi)) {
@@ -297,7 +296,12 @@ bool GrTessellatingPathRenderer::onDrawPath(const DrawPathArgs& args) {
SkAutoTUnref<GrDrawBatch> batch(TessellatingPathBatch::Create(args.fColor, *args.fPath,
*args.fStyle, *args.fViewMatrix,
clipBounds));
- args.fTarget->drawBatch(*args.fPipelineBuilder, *args.fClip, batch);
+
+ GrPipelineBuilder pipelineBuilder(*args.fPaint, args.fDrawContext->isUnifiedMultisampled());
+ pipelineBuilder.setRenderTarget(args.fDrawContext->accessRenderTarget());
+ pipelineBuilder.setUserStencil(args.fUserStencilSettings);
+
+ args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698