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

Unified Diff: src/gpu/GrDrawState.h

Issue 502533004: Revert of Make setVertexAttribs in GrDrawState take a stride parameter. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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/GrDrawState.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 ec0ccade3746dec09bb10201b03eec04c903b38d..dcd6ff9aaf8459f03ee68ec12b65c7e38311c02c 100644
--- a/src/gpu/GrDrawState.h
+++ b/src/gpu/GrDrawState.h
@@ -79,12 +79,9 @@
/**
* Sets vertex attributes for next draw. The object driving the templatization
* should be a global GrVertexAttrib array that is never changed.
- *
- * @param count the number of attributes being set, limited to kMaxVertexAttribCnt.
- * @param stride the number of bytes between successive vertex data.
- */
- template <const GrVertexAttrib A[]> void setVertexAttribs(int count, size_t stride) {
- this->internalSetVertexAttribs(A, count, stride);
+ */
+ template <const GrVertexAttrib A[]> void setVertexAttribs(int count) {
+ this->setVertexAttribs(A, count);
}
/**
@@ -100,13 +97,12 @@
public:
AutoVertexAttribRestore(GrDrawState* drawState);
- ~AutoVertexAttribRestore() { fDrawState->internalSetVertexAttribs(fVAPtr, fVACount, fVAStride); }
+ ~AutoVertexAttribRestore() { fDrawState->setVertexAttribs(fVAPtr, fVACount); }
private:
GrDrawState* fDrawState;
const GrVertexAttrib* fVAPtr;
int fVACount;
- size_t fVAStride;
};
/// @}
@@ -563,7 +559,13 @@
// This is used to assert that this condition holds.
SkDEBUGCODE(int fBlockEffectRemovalCnt;)
- void internalSetVertexAttribs(const GrVertexAttrib attribs[], int count, size_t stride);
+ /**
+ * Sets vertex attributes for next draw.
+ *
+ * @param attribs the array of vertex attributes to set.
+ * @param count the number of attributes being set, limited to kMaxVertexAttribCnt.
+ */
+ void setVertexAttribs(const GrVertexAttrib attribs[], int count);
typedef GrRODrawState INHERITED;
};
« no previous file with comments | « src/gpu/GrDistanceFieldTextContext.cpp ('k') | src/gpu/GrDrawState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698