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

Unified Diff: src/gpu/GrDrawContext.cpp

Issue 1988923002: Remove GrRenderTarget from GrPipelineBuilder (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 | « include/gpu/GrDrawContext.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawContext.cpp
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp
index 280e6326c909fcae43c6d11a65a5eef8362e3c61..263f0c8dddff3144fc0efa308b6759ec7b89b2f6 100644
--- a/src/gpu/GrDrawContext.cpp
+++ b/src/gpu/GrDrawContext.cpp
@@ -241,7 +241,6 @@ void GrDrawContext::drawPaint(const GrClip& clip,
GrRectBatchFactory::CreateNonAAFill(paint->getColor(), SkMatrix::I(), r, nullptr,
&localMatrix));
GrPipelineBuilder pipelineBuilder(*paint, this->isUnifiedMultisampled());
- pipelineBuilder.setRenderTarget(fRenderTarget.get());
this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch);
}
}
@@ -357,8 +356,7 @@ void GrDrawContext::drawRect(const GrClip& clip,
}
if (batch) {
- GrPipelineBuilder pipelineBuilder(paint, this->isUnifiedMultisampled());
- pipelineBuilder.setRenderTarget(fRenderTarget.get());
+ GrPipelineBuilder pipelineBuilder(paint, this->isUnifiedMultisampled());
if (snapToPixelCenters) {
pipelineBuilder.setState(GrPipelineBuilder::kSnapVerticesToPixelCenters_Flag,
@@ -415,7 +413,6 @@ void GrDrawContextPriv::stencilRect(const GrFixedClip& clip,
SkASSERT(batch);
GrPipelineBuilder pipelineBuilder(paint, fDrawContext->isUnifiedMultisampled());
- pipelineBuilder.setRenderTarget(fDrawContext->accessRenderTarget());
pipelineBuilder.setUserStencil(ss);
fDrawContext->getDrawTarget()->drawBatch(pipelineBuilder, fDrawContext, clip, batch);
@@ -431,7 +428,7 @@ bool GrDrawContextPriv::drawAndStencilRect(const GrFixedClip& clip,
ASSERT_SINGLE_OWNER_PRIV
RETURN_FALSE_IF_ABANDONED_PRIV
SkDEBUGCODE(fDrawContext->validate();)
- GR_AUDIT_TRAIL_AUTO_FRAME(fDrawContext->fAuditTrail, "GrDrawContext::stencilRect");
+ GR_AUDIT_TRAIL_AUTO_FRAME(fDrawContext->fAuditTrail, "GrDrawContext::drawAndStencilRect");
AutoCheckFlush acf(fDrawContext->fDrawingManager);
@@ -442,7 +439,6 @@ bool GrDrawContextPriv::drawAndStencilRect(const GrFixedClip& clip,
SkAutoTUnref<GrDrawBatch> batch(fDrawContext->getFillRectBatch(paint, viewMatrix, rect));
if (batch) {
GrPipelineBuilder pipelineBuilder(paint, fDrawContext->isUnifiedMultisampled());
- pipelineBuilder.setRenderTarget(fDrawContext->accessRenderTarget());
pipelineBuilder.setUserStencil(ss);
fDrawContext->getDrawTarget()->drawBatch(pipelineBuilder, fDrawContext, clip, batch);
@@ -479,7 +475,6 @@ void GrDrawContext::fillRectToRect(const GrClip& clip,
if (batch) {
GrPipelineBuilder pipelineBuilder(paint, this->isUnifiedMultisampled());
- pipelineBuilder.setRenderTarget(fRenderTarget.get());
this->drawBatch(pipelineBuilder, clip, batch);
}
}
@@ -506,8 +501,7 @@ void GrDrawContext::fillRectWithLocalMatrix(const GrClip& clip,
nullptr, &localMatrix));
}
- GrPipelineBuilder pipelineBuilder(paint, this->isUnifiedMultisampled());
- pipelineBuilder.setRenderTarget(fRenderTarget.get());
+ GrPipelineBuilder pipelineBuilder(paint, this->isUnifiedMultisampled());
this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch);
}
@@ -552,8 +546,7 @@ void GrDrawContext::drawVertices(const GrClip& clip,
indexCount, colors, texCoords,
bounds));
- GrPipelineBuilder pipelineBuilder(paint, this->isUnifiedMultisampled());
- pipelineBuilder.setRenderTarget(fRenderTarget.get());
+ GrPipelineBuilder pipelineBuilder(paint, this->isUnifiedMultisampled());
this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch);
}
@@ -578,8 +571,7 @@ void GrDrawContext::drawAtlas(const GrClip& clip,
SkAutoTUnref<GrDrawBatch> batch(GrDrawAtlasBatch::Create(geometry, viewMatrix, spriteCount,
xform, texRect, colors));
- GrPipelineBuilder pipelineBuilder(paint, this->isUnifiedMultisampled());
- pipelineBuilder.setRenderTarget(fRenderTarget.get());
+ GrPipelineBuilder pipelineBuilder(paint, this->isUnifiedMultisampled());
this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch);
}
@@ -612,8 +604,7 @@ void GrDrawContext::drawRRect(const GrClip& clip,
stroke,
shaderCaps));
if (batch) {
- GrPipelineBuilder pipelineBuilder(paint, this->isUnifiedMultisampled());
- pipelineBuilder.setRenderTarget(fRenderTarget.get());
+ GrPipelineBuilder pipelineBuilder(paint, this->isUnifiedMultisampled());
this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch);
return;
}
@@ -738,8 +729,7 @@ void GrDrawContext::drawOval(const GrClip& clip,
stroke,
shaderCaps));
if (batch) {
- GrPipelineBuilder pipelineBuilder(paint, this->isUnifiedMultisampled());
- pipelineBuilder.setRenderTarget(fRenderTarget.get());
+ GrPipelineBuilder pipelineBuilder(paint, this->isUnifiedMultisampled());
this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch);
return;
}
@@ -769,8 +759,7 @@ void GrDrawContext::drawImageNine(const GrClip& clip,
imageWidth, imageHeight,
center, dst));
- GrPipelineBuilder pipelineBuilder(paint, this->isUnifiedMultisampled());
- pipelineBuilder.setRenderTarget(fRenderTarget.get());
+ GrPipelineBuilder pipelineBuilder(paint, this->isUnifiedMultisampled());
this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch);
}
@@ -830,8 +819,7 @@ void GrDrawContext::drawBatch(const GrClip& clip,
AutoCheckFlush acf(fDrawingManager);
- GrPipelineBuilder pipelineBuilder(paint, this->isUnifiedMultisampled());
- pipelineBuilder.setRenderTarget(fRenderTarget.get());
+ GrPipelineBuilder pipelineBuilder(paint, this->isUnifiedMultisampled());
this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch);
}
@@ -863,8 +851,7 @@ void GrDrawContext::drawPath(const GrClip& clip,
SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateAAFillNestedRects(
paint.getColor(), viewMatrix, rects));
if (batch) {
- GrPipelineBuilder pipelineBuilder(paint, this->isUnifiedMultisampled());
- pipelineBuilder.setRenderTarget(fRenderTarget.get());
+ GrPipelineBuilder pipelineBuilder(paint, this->isUnifiedMultisampled());
this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch);
}
return;
@@ -881,8 +868,7 @@ void GrDrawContext::drawPath(const GrClip& clip,
style.strokeRec(),
shaderCaps));
if (batch) {
- GrPipelineBuilder pipelineBuilder(paint, this->isUnifiedMultisampled());
- pipelineBuilder.setRenderTarget(fRenderTarget.get());
+ GrPipelineBuilder pipelineBuilder(paint, this->isUnifiedMultisampled());
this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch);
return;
}
« no previous file with comments | « include/gpu/GrDrawContext.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698