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

Unified Diff: src/gpu/GrOptDrawState.cpp

Issue 715903002: Push creation of default GP to the caller (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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/GrOptDrawState.cpp
diff --git a/src/gpu/GrOptDrawState.cpp b/src/gpu/GrOptDrawState.cpp
index 79eef0c02499153e642c084e62ea706db0ebcacb..60ec6a4fa1d58efbfcb2d1a8dcdbd928d491636c 100644
--- a/src/gpu/GrOptDrawState.cpp
+++ b/src/gpu/GrOptDrawState.cpp
@@ -59,12 +59,11 @@ GrOptDrawState::GrOptDrawState(const GrDrawState& drawState,
this->getStageStats(drawState, firstColorStageIdx, firstCoverageStageIdx, &descInfo);
// Copy GeometryProcesssor from DS or ODS
+ SkASSERT(GrGpu::IsPathRenderingDrawType(drawType) ||
+ GrGpu::kStencilPath_DrawType ||
+ drawState.hasGeometryProcessor());
if (drawState.hasGeometryProcessor()) {
fGeometryProcessor.initAndRef(drawState.fGeometryProcessor);
- } else if (!GrGpu::IsPathRenderingDrawType(drawType)) {
- // Install default GP, this will be ignored if we are rendering with fragment shader only
- // TODO(joshualitt) rendering code should do this
- fGeometryProcessor.reset(GrDefaultGeoProcFactory::Create());
} else {
fGeometryProcessor.reset(NULL);
}

Powered by Google App Engine
This is Rietveld 408576698