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

Unified Diff: src/gpu/GrDrawContext.cpp

Issue 1420043002: Narrow the distribution of GrDrawTarget a bit (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 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/GrContext.cpp ('k') | src/gpu/GrPathRendererChain.cpp » ('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 99a1ce53906d1dedb6297f17918ebead4f143f7f..f52d7dcd1540698393f3482fcc2a5526dbbc3077 100644
--- a/src/gpu/GrDrawContext.cpp
+++ b/src/gpu/GrDrawContext.cpp
@@ -461,7 +461,7 @@ void GrDrawContext::drawRRect(const GrClip& clip,
SkPath path;
path.setIsVolatile(true);
path.addRRect(rrect);
- this->internalDrawPath(this->getDrawTarget(), &pipelineBuilder, viewMatrix, color,
+ this->internalDrawPath(&pipelineBuilder, viewMatrix, color,
paint.isAntiAlias(), path, strokeInfo);
}
}
@@ -498,7 +498,7 @@ void GrDrawContext::drawDRRect(const GrClip& clip,
path.setFillType(SkPath::kEvenOdd_FillType);
GrStrokeInfo fillRec(SkStrokeRec::kFill_InitStyle);
- this->internalDrawPath(this->getDrawTarget(), &pipelineBuilder, viewMatrix, color,
+ this->internalDrawPath(&pipelineBuilder, viewMatrix, color,
paint.isAntiAlias(), path, fillRec);
}
}
@@ -540,7 +540,7 @@ void GrDrawContext::drawOval(const GrClip& clip,
SkPath path;
path.setIsVolatile(true);
path.addOval(oval);
- this->internalDrawPath(this->getDrawTarget(), &pipelineBuilder, viewMatrix, color,
+ this->internalDrawPath(&pipelineBuilder, viewMatrix, color,
paint.isAntiAlias(), path, strokeInfo);
}
}
@@ -661,12 +661,11 @@ void GrDrawContext::drawPath(const GrClip& clip,
}
}
}
- this->internalDrawPath(this->getDrawTarget(), &pipelineBuilder, viewMatrix, color,
+ this->internalDrawPath(&pipelineBuilder, viewMatrix, color,
paint.isAntiAlias(), path, strokeInfo);
}
-void GrDrawContext::internalDrawPath(GrDrawTarget* target,
- GrPipelineBuilder* pipelineBuilder,
+void GrDrawContext::internalDrawPath(GrPipelineBuilder* pipelineBuilder,
const SkMatrix& viewMatrix,
GrColor color,
bool useAA,
@@ -692,7 +691,7 @@ void GrDrawContext::internalDrawPath(GrDrawTarget* target,
const GrStrokeInfo* strokeInfoPtr = &strokeInfo;
// Try a 1st time without stroking the path and without allowing the SW renderer
- GrPathRenderer* pr = fDrawingManager->getContext()->getPathRenderer(target, pipelineBuilder,
+ GrPathRenderer* pr = fDrawingManager->getContext()->getPathRenderer(pipelineBuilder,
viewMatrix, *pathPtr,
*strokeInfoPtr, false,
type);
@@ -708,7 +707,7 @@ void GrDrawContext::internalDrawPath(GrDrawTarget* target,
return;
}
strokeInfoPtr = &dashlessStrokeInfo;
- pr = fDrawingManager->getContext()->getPathRenderer(target, pipelineBuilder, viewMatrix,
+ pr = fDrawingManager->getContext()->getPathRenderer(pipelineBuilder, viewMatrix,
*pathPtr, *strokeInfoPtr,
false, type);
}
@@ -733,7 +732,7 @@ void GrDrawContext::internalDrawPath(GrDrawTarget* target,
}
// This time, allow SW renderer
- pr = fDrawingManager->getContext()->getPathRenderer(target, pipelineBuilder, viewMatrix,
+ pr = fDrawingManager->getContext()->getPathRenderer(pipelineBuilder, viewMatrix,
*pathPtr, *strokeInfoPtr,
true, type);
}
@@ -746,7 +745,7 @@ void GrDrawContext::internalDrawPath(GrDrawTarget* target,
}
GrPathRenderer::DrawPathArgs args;
- args.fTarget = target;
+ args.fTarget = this->getDrawTarget();
args.fResourceProvider = fDrawingManager->getContext()->resourceProvider();
args.fPipelineBuilder = pipelineBuilder;
args.fColor = color;
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrPathRendererChain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698