Swizzle shader output and blend when using GL_RED to implement kAlpha_8_GrPixelConfig
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1584473002
Review URL: https://codereview.chromium.org/1584473002
diff --git a/src/gpu/GrProgramDesc.h b/src/gpu/GrProgramDesc.h
index 13dd149..63e060e 100644
--- a/src/gpu/GrProgramDesc.h
+++ b/src/gpu/GrProgramDesc.h
@@ -70,15 +70,16 @@
}
struct KeyHeader {
- uint8_t fFragPosKey; // set by GrGLShaderBuilder if there are
- // effects that read the fragment position.
- // Otherwise, 0.
+ // Set by GrGLShaderBuilder if there are effects that read the fragment position. Otherwise,
+ // 0.
+ uint8_t fFragPosKey;
+ // Set to uniquely idenitify any swizzling of the shader's output color(s).
+ uint8_t fOutputSwizzle;
uint8_t fSnapVerticesToPixelCenters;
int8_t fColorEffectCnt;
int8_t fCoverageEffectCnt;
uint8_t fIgnoresCoverage;
};
- GR_STATIC_ASSERT(sizeof(KeyHeader) == 5);
int numColorEffects() const {
return this->header().fColorEffectCnt;