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

Unified Diff: src/gpu/gl/GrGLProgramDesc.h

Issue 554833002: Calculate Primary and Secondary output types in the GrOptDrawState (Closed) Base URL: https://skia.googlesource.com/skia.git@optReadDst
Patch Set: Rebase Created 6 years, 3 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/gl/GrGLProgram.cpp ('k') | src/gpu/gl/GrGLProgramDesc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLProgramDesc.h
diff --git a/src/gpu/gl/GrGLProgramDesc.h b/src/gpu/gl/GrGLProgramDesc.h
index c9bdac54ee389f562669d9e0ba94e9474c8494cc..172a202b42324ed1f74fb6ae2d63a0df277e6e94 100644
--- a/src/gpu/gl/GrGLProgramDesc.h
+++ b/src/gpu/gl/GrGLProgramDesc.h
@@ -11,6 +11,7 @@
#include "GrGLEffect.h"
#include "GrDrawState.h"
#include "GrGpu.h"
+#include "GrOptDrawState.h"
class GrGpuGL;
@@ -111,50 +112,24 @@ private:
kColorInputCnt
};
- enum CoverageOutput {
- // modulate color and coverage, write result as the color output.
- kModulate_CoverageOutput,
- // Writes color*coverage as the primary color output and also writes coverage as the
- // secondary output. Only set if dual source blending is supported.
- kSecondaryCoverage_CoverageOutput,
- // Writes color*coverage as the primary color output and also writes coverage * (1 - colorA)
- // as the secondary output. Only set if dual source blending is supported.
- kSecondaryCoverageISA_CoverageOutput,
- // Writes color*coverage as the primary color output and also writes coverage *
- // (1 - colorRGB) as the secondary output. Only set if dual source blending is supported.
- kSecondaryCoverageISC_CoverageOutput,
- // Combines the coverage, dst, and color as coverage * color + (1 - coverage) * dst. This
- // can only be set if fDstReadKey is non-zero.
- kCombineWithDst_CoverageOutput,
-
- kCoverageOutputCnt
- };
-
- static bool CoverageOutputUsesSecondaryOutput(CoverageOutput co) {
- switch (co) {
- case kSecondaryCoverage_CoverageOutput: // fallthru
- case kSecondaryCoverageISA_CoverageOutput:
- case kSecondaryCoverageISC_CoverageOutput:
- return true;
- default:
- return false;
- }
- }
-
struct KeyHeader {
- uint8_t fDstReadKey; // set by GrGLShaderBuilder if there
+ uint8_t fDstReadKey; // set by GrGLShaderBuilder if there
// are effects that must read the dst.
// Otherwise, 0.
- uint8_t fFragPosKey; // set by GrGLShaderBuilder if there are
+ uint8_t fFragPosKey; // set by GrGLShaderBuilder if there are
// effects that read the fragment position.
// Otherwise, 0.
- ColorInput fColorInput : 8;
- ColorInput fCoverageInput : 8;
- CoverageOutput fCoverageOutput : 8;
SkBool8 fUseFragShaderOnly;
SkBool8 fEmitsPointSize;
+ ColorInput fColorInput : 8;
+ ColorInput fCoverageInput : 8;
+
+ GrOptDrawState::PrimaryOutputType fPrimaryOutputType : 8;
+ GrOptDrawState::SecondaryOutputType fSecondaryOutputType : 8;
+
+
// To enable experimental geometry shader code (not for use in
// production)
#if GR_GL_EXPERIMENTAL_GS
« no previous file with comments | « src/gpu/gl/GrGLProgram.cpp ('k') | src/gpu/gl/GrGLProgramDesc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698