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

Unified Diff: src/gpu/GrTargetCommands.cpp

Issue 1157683006: Refactor GrGpu path rendering functions to GrPathRendering (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase, remove include ordering Created 5 years, 7 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/GrSWMaskHelper.cpp ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTargetCommands.cpp
diff --git a/src/gpu/GrTargetCommands.cpp b/src/gpu/GrTargetCommands.cpp
index 096d429dea31bc2971c143b7fcceabe226d11aef..84dbf9346e127d0036390c54ae04d70c2cc2cd4e 100644
--- a/src/gpu/GrTargetCommands.cpp
+++ b/src/gpu/GrTargetCommands.cpp
@@ -55,14 +55,9 @@ void GrTargetCommands::flush(GrInOrderDrawBuffer* iodb) {
}
void GrTargetCommands::StencilPath::execute(GrGpu* gpu) {
- GrGpu::StencilPathState state;
- state.fRenderTarget = fRenderTarget.get();
- state.fScissor = &fScissor;
- state.fStencil = &fStencil;
- state.fUseHWAA = fUseHWAA;
- state.fViewMatrix = &fViewMatrix;
-
- gpu->stencilPath(this->path(), state);
+ GrPathRendering::StencilPathArgs args(fUseHWAA, fRenderTarget.get(), &fViewMatrix, &fScissor,
+ &fStencil);
+ gpu->pathRendering()->stencilPath(args, this->path());
}
void GrTargetCommands::DrawPath::execute(GrGpu* gpu) {
@@ -71,9 +66,9 @@ void GrTargetCommands::DrawPath::execute(GrGpu* gpu) {
fState->fBatchTracker);
fState->fCompiled = true;
}
- DrawArgs args(fState->fPrimitiveProcessor.get(), fState->getPipeline(),
- &fState->fDesc, &fState->fBatchTracker);
- gpu->drawPath(args, this->path(), fStencilSettings);
+ GrPathRendering::DrawPathArgs args(fState->fPrimitiveProcessor.get(), fState->getPipeline(),
+ &fState->fDesc, &fState->fBatchTracker, &fStencilSettings);
+ gpu->pathRendering()->drawPath(args, this->path());
}
void GrTargetCommands::DrawPaths::execute(GrGpu* gpu) {
@@ -82,12 +77,10 @@ void GrTargetCommands::DrawPaths::execute(GrGpu* gpu) {
fState->fBatchTracker);
fState->fCompiled = true;
}
- DrawArgs args(fState->fPrimitiveProcessor.get(), fState->getPipeline(),
- &fState->fDesc, &fState->fBatchTracker);
- gpu->drawPaths(args, this->pathRange(),
- fIndices, fIndexType,
- fTransforms, fTransformType,
- fCount, fStencilSettings);
+ GrPathRendering::DrawPathArgs args(fState->fPrimitiveProcessor.get(), fState->getPipeline(),
+ &fState->fDesc, &fState->fBatchTracker, &fStencilSettings);
+ gpu->pathRendering()->drawPaths(args, this->pathRange(), fIndices, fIndexType, fTransforms,
+ fTransformType, fCount);
}
void GrTargetCommands::DrawBatch::execute(GrGpu*) {
« no previous file with comments | « src/gpu/GrSWMaskHelper.cpp ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698