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

Unified Diff: src/gpu/GrDrawState.h

Issue 543623004: Removing vertex attrib indices (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: warning fixed 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/GrDistanceFieldTextContext.cpp ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawState.h
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h
index 4850fc911c8dc35e1c9172172055cf8c33242d76..6a1e38056bbcad8da3a29498cf3b5f1d0f0ac85b 100644
--- a/src/gpu/GrDrawState.h
+++ b/src/gpu/GrDrawState.h
@@ -180,10 +180,11 @@ public:
* but is never put in the color processing pipeline.
*/
- const GrEffect* setGeometryProcessor(const GrEffect* effect, int attr0 = -1, int attr1 = -1) {
+ const GrEffect* setGeometryProcessor(const GrEffect* effect) {
SkASSERT(effect);
+ SkASSERT(effect->requiresVertexShader());
SkASSERT(!this->hasGeometryProcessor());
- fGeometryProcessor.reset(new GrEffectStage(effect, attr0, attr1));
+ fGeometryProcessor.reset(new GrEffectStage(effect));
this->invalidateOptState();
return effect;
}
@@ -208,16 +209,18 @@ public:
/// the color / coverage distinction.
////
- const GrEffect* addColorEffect(const GrEffect* effect, int attr0 = -1, int attr1 = -1) {
+ const GrEffect* addColorEffect(const GrEffect* effect) {
SkASSERT(effect);
- SkNEW_APPEND_TO_TARRAY(&fColorStages, GrEffectStage, (effect, attr0, attr1));
+ SkASSERT(!effect->requiresVertexShader());
+ SkNEW_APPEND_TO_TARRAY(&fColorStages, GrEffectStage, (effect));
this->invalidateOptState();
return effect;
}
- const GrEffect* addCoverageEffect(const GrEffect* effect, int attr0 = -1, int attr1 = -1) {
+ const GrEffect* addCoverageEffect(const GrEffect* effect) {
SkASSERT(effect);
- SkNEW_APPEND_TO_TARRAY(&fCoverageStages, GrEffectStage, (effect, attr0, attr1));
+ SkASSERT(!effect->requiresVertexShader());
+ SkNEW_APPEND_TO_TARRAY(&fCoverageStages, GrEffectStage, (effect));
this->invalidateOptState();
return effect;
}
« no previous file with comments | « src/gpu/GrDistanceFieldTextContext.cpp ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698