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

Unified Diff: src/gpu/GrProcOptInfo.cpp

Issue 759713002: Make all blending up to GrOptDrawState be handled by the xp/xp factory. (Closed) Base URL: https://skia.googlesource.com/skia.git@xferFactorySolo
Patch Set: rebase Created 6 years 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/GrProcOptInfo.h ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrProcOptInfo.cpp
diff --git a/src/gpu/GrProcOptInfo.cpp b/src/gpu/GrProcOptInfo.cpp
index 18a32020d4539154ca9d993ea98698ea05f3c35f..a84ac2e17fb45dcfb2a9f556b2a628dd68bcf53f 100644
--- a/src/gpu/GrProcOptInfo.cpp
+++ b/src/gpu/GrProcOptInfo.cpp
@@ -7,8 +7,9 @@
#include "GrProcOptInfo.h"
-#include "GrGeometryProcessor.h"
+#include "GrFragmentProcessor.h"
#include "GrFragmentStage.h"
+#include "GrGeometryProcessor.h"
void GrProcOptInfo::calcWithInitialValues(const GrFragmentStage* stages,
int stageCount,
@@ -22,6 +23,7 @@ void GrProcOptInfo::calcWithInitialValues(const GrFragmentStage* stages,
fInputColor = startColor;
fRemoveVertexAttrib = false;
fReadsDst = false;
+ fReadsFragPosition = false;
if (areCoverageStages && gp) {
gp->computeInvariantOutput(&fInOut);
@@ -31,17 +33,22 @@ void GrProcOptInfo::calcWithInitialValues(const GrFragmentStage* stages,
const GrFragmentProcessor* processor = stages[i].getProcessor();
fInOut.resetWillUseInputColor();
processor->computeInvariantOutput(&fInOut);
- #ifdef SK_DEBUG
+#ifdef SK_DEBUG
fInOut.validate();
- #endif
+#endif
if (!fInOut.willUseInputColor()) {
fFirstEffectStageIndex = i;
fInputColorIsUsed = false;
- fReadsDst = false; // Reset this since we don't care if previous stages read dst
+ // Reset these since we don't care if previous stages read these values
+ fReadsDst = false;
+ fReadsFragPosition = false;
}
if (processor->willReadDstColor()) {
fReadsDst = true;
}
+ if (processor->willReadFragmentPosition()) {
+ fReadsFragPosition = true;
+ }
if (kRGBA_GrColorComponentFlags == fInOut.validFlags()) {
fFirstEffectStageIndex = i + 1;
fInputColor = fInOut.color();
@@ -50,7 +57,10 @@ void GrProcOptInfo::calcWithInitialValues(const GrFragmentStage* stages,
// Since we are clearing all previous color stages we are in a state where we have found
// zero stages that don't multiply the inputColor.
fInOut.resetNonMulStageFound();
- fReadsDst = false; // Reset this since we don't care if previous stages read dst
+ // Reset these since we don't care if previous stages read these values
+ fReadsDst = false;
+ fReadsFragPosition = false;
}
}
}
+
« no previous file with comments | « src/gpu/GrProcOptInfo.h ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698