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

Unified Diff: src/gpu/GrOptDrawState.cpp

Issue 647183002: Revert of Opt state takes a GP instead of a GeometryStage (Closed) Base URL: https://skia.googlesource.com/skia.git@builder_cleanup
Patch Set: Created 6 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/GrOptDrawState.h ('k') | src/gpu/GrProcessor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrOptDrawState.cpp
diff --git a/src/gpu/GrOptDrawState.cpp b/src/gpu/GrOptDrawState.cpp
index 7c8710f7d6466fd8d6432732c0af904132a2f0b4..b3d90f7310204f7958a2a29fb42050e640c11a0c 100644
--- a/src/gpu/GrOptDrawState.cpp
+++ b/src/gpu/GrOptDrawState.cpp
@@ -54,7 +54,7 @@
// Copy GeometryProcesssor from DS or ODS
if (drawState.hasGeometryProcessor()) {
- fGeometryProcessor.initAndRef(drawState.fGeometryProcessor);
+ fGeometryProcessor.reset(SkNEW_ARGS(GrGeometryStage, (*drawState.getGeometryProcessor())));
} else {
fGeometryProcessor.reset(NULL);
}
@@ -305,8 +305,8 @@
get_stage_stats(stage, &fReadsDst, &fReadsFragPosition);
}
if (ds.hasGeometryProcessor()) {
- const GrGeometryProcessor& gp = *ds.getGeometryProcessor();
- fReadsFragPosition = fReadsFragPosition || gp.willReadFragmentPosition();
+ const GrGeometryStage& stage = *ds.getGeometryProcessor();
+ fReadsFragPosition = fReadsFragPosition || stage.getProcessor()->willReadFragmentPosition();
}
}
@@ -354,7 +354,9 @@
if (this->hasGeometryProcessor()) {
if (!that.hasGeometryProcessor()) {
return false;
- } else if (!this->getGeometryProcessor()->isEqual(*that.getGeometryProcessor())) {
+ } else if (!GrProcessorStage::AreCompatible(*this->getGeometryProcessor(),
+ *that.getGeometryProcessor(),
+ explicitLocalCoords)) {
return false;
}
} else if (that.hasGeometryProcessor()) {
@@ -362,8 +364,8 @@
}
for (int i = 0; i < this->numFragmentStages(); i++) {
- if (!GrFragmentStage::AreCompatible(this->getFragmentStage(i), that.getFragmentStage(i),
- explicitLocalCoords)) {
+ if (!GrProcessorStage::AreCompatible(this->getFragmentStage(i), that.getFragmentStage(i),
+ explicitLocalCoords)) {
return false;
}
}
« no previous file with comments | « src/gpu/GrOptDrawState.h ('k') | src/gpu/GrProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698