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

Unified Diff: src/gpu/GrOptDrawState.cpp

Issue 719203002: Add GrProcOptInfo class to track various output information for color and coverage stages. (Closed) Base URL: https://skia.googlesource.com/skia.git@moveIO
Patch Set: Clean up 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 7d8b06c129cbb570d45d8622dd4483fcd3a5f47c..6874ea7afc3481dff300cefa7750f7b694f8c2e8 100644
--- a/src/gpu/GrOptDrawState.cpp
+++ b/src/gpu/GrOptDrawState.cpp
@@ -11,7 +11,7 @@
#include "GrDrawState.h"
#include "GrDrawTargetCaps.h"
#include "GrGpu.h"
-#include "GrInvariantOutput.h"
+#include "GrProcOptInfo.h"
GrOptDrawState::GrOptDrawState(const GrDrawState& drawState,
BlendOptFlags blendOptFlags,
@@ -239,8 +239,17 @@ void GrOptDrawState::computeEffectiveColorStages(const GrDrawState& ds,
color = 0;
}
}
- GrInvariantOutput inout(color, flags, false);
-
+ GrProcOptInfo poi;
+ if (ds.numColorStages() > 0) {
+ poi.calcWithInitialValues(&ds.getColorStage(0), ds.numColorStages(), color, flags, false);
+ *firstColorStageIdx = poi.firstEffectiveStageIndex();
+ descInfo->fInputColorIsUsed = poi.inputColorIsUsed();
+ fColor = poi.inputColorToEffectiveStage();
+ if (poi.removeVertexAttrib()) {
+ *fixedFunctionVAToRemove |= 0x1 << kColor_GrVertexAttribBinding;
+ }
+ }
+/*
for (int i = 0; i < ds.numColorStages(); ++i) {
const GrFragmentProcessor* fp = ds.getColorStage(i).getProcessor();
fp->computeInvariantOutput(&inout);
@@ -258,6 +267,7 @@ void GrOptDrawState::computeEffectiveColorStages(const GrDrawState& ds,
inout.resetNonMulStageFound();
}
}
+ */
}
void GrOptDrawState::computeEffectiveCoverageStages(const GrDrawState& ds,
« no previous file with comments | « src/gpu/GrInvariantOutput.cpp ('k') | src/gpu/GrPaint.cpp » ('j') | src/gpu/GrProcessor.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698