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

Unified Diff: src/gpu/GrProgramDesc.h

Issue 746423007: Draft change to start pulling uniform color into GP (Closed) Base URL: https://skia.googlesource.com/skia.git@no_factories
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/GrProcessor.cpp ('k') | src/gpu/effects/GrBezierEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrProgramDesc.h
diff --git a/src/gpu/GrProgramDesc.h b/src/gpu/GrProgramDesc.h
index 022bbc3d442a823088df24d4d1b61df956175188..8e255275b6d30a50e71bba09cc262ee28f4eb95b 100644
--- a/src/gpu/GrProgramDesc.h
+++ b/src/gpu/GrProgramDesc.h
@@ -54,16 +54,6 @@ public:
return memcmp(a.asKey(), b.asKey(), a.keyLength() & ~0x3) < 0;
}
-
- // Specifies where the initial color comes from before the stages are applied.
- enum ColorInput {
- kAllOnes_ColorInput,
- kAttribute_ColorInput,
- kUniform_ColorInput,
-
- kColorInputCnt
- };
-
struct KeyHeader {
uint8_t fDstReadKey; // set by GrGLShaderBuilder if there
// are effects that must read the dst.
@@ -72,19 +62,10 @@ public:
// effects that read the fragment position.
// Otherwise, 0.
- ColorInput fColorInput : 8;
- ColorInput fCoverageInput : 8;
-
- SkBool8 fHasGeometryProcessor;
int8_t fColorEffectCnt;
int8_t fCoverageEffectCnt;
};
-
- bool hasGeometryProcessor() const {
- return SkToBool(this->header().fHasGeometryProcessor);
- }
-
int numColorEffects() const {
return this->header().fColorEffectCnt;
}
@@ -101,31 +82,17 @@ public:
// A struct to communicate descriptor information to the program descriptor builder
struct DescInfo {
bool operator==(const DescInfo& that) const {
- return fHasVertexColor == that.fHasVertexColor &&
- fHasVertexCoverage == that.fHasVertexCoverage &&
- fInputColorIsUsed == that.fInputColorIsUsed &&
- fInputCoverageIsUsed == that.fInputCoverageIsUsed &&
- fReadsDst == that.fReadsDst &&
+ return fReadsDst == that.fReadsDst &&
fReadsFragPosition == that.fReadsFragPosition &&
fRequiresLocalCoordAttrib == that.fRequiresLocalCoordAttrib;
}
bool operator!=(const DescInfo& that) const { return !(*this == that); };
- // TODO when GPs control uniform / attribute handling of color / coverage, then we can
- // clean this up
- bool fHasVertexColor;
- bool fHasVertexCoverage;
-
- // These flags are needed to protect the code from creating an unused uniform color/coverage
- // which will cause shader compiler errors.
- bool fInputColorIsUsed;
- bool fInputCoverageIsUsed;
// These flags give aggregated info on the processor stages that are used when building
// programs.
bool fReadsDst;
bool fReadsFragPosition;
bool fRequiresLocalCoordAttrib;
-
};
private:
« no previous file with comments | « src/gpu/GrProcessor.cpp ('k') | src/gpu/effects/GrBezierEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698