| Index: src/gpu/GrDrawState.h
|
| ===================================================================
|
| --- src/gpu/GrDrawState.h (revision 8019)
|
| +++ src/gpu/GrDrawState.h (working copy)
|
| @@ -181,6 +181,8 @@
|
| */
|
| void setDefaultVertexAttribs();
|
|
|
| + bool validateVertexAttribs() const;
|
| +
|
| ////////////////////////////////////////////////////////////////////////////
|
| // Helpers for picking apart vertex attributes
|
|
|
| @@ -332,7 +334,7 @@
|
| bool hasSolidCoverage(GrAttribBindings) const;
|
|
|
| static void VertexAttributesUnitTest();
|
| -
|
| +
|
| /// @}
|
|
|
| ///////////////////////////////////////////////////////////////////////////
|
| @@ -483,8 +485,9 @@
|
| /// @name Effect Stages
|
| ////
|
|
|
| - const GrEffectRef* setEffect(int stageIdx, const GrEffectRef* effect) {
|
| - fStages[stageIdx].setEffect(effect);
|
| + const GrEffectRef* setEffect(int stageIdx, const GrEffectRef* effect,
|
| + const int* indices = NULL) {
|
| + fStages[stageIdx].setEffect(effect, indices);
|
| return effect;
|
| }
|
|
|
| @@ -514,7 +517,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 +1026,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
|
| };
|
| @@ -1189,14 +1191,9 @@
|
| if (fRenderTarget.get() != s.fRenderTarget.get() || fCommon != s.fCommon) {
|
| return false;
|
| }
|
| - if (fVertexAttribs.count() != s.fVertexAttribs.count()) {
|
| + if (fVertexAttribs != s.fVertexAttribs) {
|
| return false;
|
| }
|
| - for (int i = 0; i < fVertexAttribs.count(); ++i) {
|
| - if (fVertexAttribs[i] != s.fVertexAttribs[i]) {
|
| - return false;
|
| - }
|
| - }
|
| for (int i = 0; i < kAttribIndexCount; ++i) {
|
| if ((i == kPosition_AttribIndex ||
|
| s.fCommon.fAttribBindings & kAttribIndexMasks[i]) &&
|
| @@ -1335,13 +1332,9 @@
|
| return false;
|
| }
|
| }
|
| - if (fVertexAttribs.count() != state.fVertexAttribs.count()) {
|
| + if (fVertexAttribs != state.fVertexAttribs) {
|
| return false;
|
| }
|
| - for (int i = 0; i < fVertexAttribs.count(); ++i)
|
| - if (fVertexAttribs[i] != state.fVertexAttribs[i]) {
|
| - return false;
|
| - }
|
| for (int i = 0; i < kNumStages; ++i) {
|
| if (!fStages[i].isEqual(state.fStages[i])) {
|
| return false;
|
|
|