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

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

Issue 647183002: Revert of Opt state takes a GP instead of a GeometryStage (Closed) Base URL: https://skia.googlesource.com/skia.git@builder_cleanup
Patch Set: Created 6 years, 2 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 4e1be5b2f9c0d1127b62c134bfdc2471a17bb55d..9bf7553b61cfede488dd9b15283302a23f2aedd0 100644
--- a/src/gpu/gl/GrGLProgramDesc.h
+++ b/src/gpu/gl/GrGLProgramDesc.h
@@ -43,8 +43,13 @@
*/
static bool Build(const GrOptDrawState&,
GrGpu::DrawType,
+ GrBlendCoeff srcCoeff,
+ GrBlendCoeff dstCoeff,
GrGpuGL*,
- const GrDeviceCoordTexture*,
+ const GrDeviceCoordTexture* dstCopy,
+ const GrGeometryStage** geometryProcessor,
+ SkTArray<const GrFragmentStage*, true>* colorStages,
+ SkTArray<const GrFragmentStage*, true>* coverageStages,
GrGLProgramDesc*);
bool hasGeometryProcessor() const {
@@ -155,22 +160,25 @@
const KeyHeader& getHeader() const { return *this->atOffset<KeyHeader, kHeaderOffset>(); }
/** Used to provide effects' keys to their emitCode() function. */
- class ProcKeyProvider {
+ class EffectKeyProvider {
public:
- enum ProcessorType {
- kGeometry_ProcessorType,
- kFragment_ProcessorType,
+ enum EffectType {
+ kGeometryProcessor_EffectType,
+ kColor_EffectType,
+ kCoverage_EffectType,
};
- ProcKeyProvider(const GrGLProgramDesc* desc, ProcessorType type)
- : fDesc(desc), fBaseIndex(0) {
+ EffectKeyProvider(const GrGLProgramDesc* desc, EffectType type) : fDesc(desc) {
switch (type) {
- case kGeometry_ProcessorType:
+ case kGeometryProcessor_EffectType:
// there can be only one
fBaseIndex = 0;
break;
- case kFragment_ProcessorType:
+ case kColor_EffectType:
fBaseIndex = desc->hasGeometryProcessor() ? 1 : 0;
+ break;
+ case kCoverage_EffectType:
+ fBaseIndex = desc->numColorEffects() + (desc->hasGeometryProcessor() ? 1 : 0);
break;
}
}
« 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