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

Unified Diff: src/gpu/GrDrawState.h

Issue 12462008: Add GrEllipseEdgeEffect (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Cleaned up nits, adjusted some interfaces Created 7 years, 9 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
Index: src/gpu/GrDrawState.h
===================================================================
--- src/gpu/GrDrawState.h (revision 7952)
+++ src/gpu/GrDrawState.h (working copy)
@@ -488,6 +488,13 @@
return effect;
}
+ const GrEffectRef* setEffect(int stageIdx, const GrEffectRef* effect, const int indices[]) {
+ fStages[stageIdx].setEffect(effect);
bsalomon 2013/03/07 15:59:13 Any reason not to move this code to StageEffect::s
jvanverth1 2013/03/07 22:00:44 Done.
+ int numVertexAttribs = (effect == NULL) ? 0 : effect->get()->numVertexAttribs();
+ fStages[stageIdx].setVertexAttribIndices(indices, numVertexAttribs);
+ return effect;
+ }
+
/**
* Creates a GrSimpleTextureEffect.
*/
@@ -514,7 +521,9 @@
return true;
}
- void disableStage(int stageIdx) { this->setEffect(stageIdx, NULL); }
+ void disableStage(int stageIdx) {
+ this->setEffect(stageIdx, NULL, NULL);
+ }
/**
* Release all the GrEffects referred to by this draw state.
@@ -1021,9 +1030,6 @@
/* Circle specified as center_x, center_y, outer_radius, inner_radius
all in window space (y-down). */
kCircle_EdgeType,
- /* Axis-aligned ellipse specified as center_x, center_y, x_radius, x_radius/y_radius
- all in window space (y-down). */
- kEllipse_EdgeType,
kVertexEdgeTypeCnt
};
« src/gpu/GrContext.cpp ('K') | « src/gpu/GrContext.cpp ('k') | src/gpu/GrEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698