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

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

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