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

Unified Diff: src/gpu/GrInOrderDrawBuffer.cpp

Issue 12379052: Remove constructors from GrVertexAttrib (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 10 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/GrInOrderDrawBuffer.cpp
===================================================================
--- src/gpu/GrInOrderDrawBuffer.cpp (revision 7929)
+++ src/gpu/GrInOrderDrawBuffer.cpp (working copy)
@@ -90,7 +90,8 @@
// set position attrib
drawState->setAttribIndex(GrDrawState::kPosition_AttribIndex, attribs.count());
- attribs.push_back(GrVertexAttrib(kVec2f_GrVertexAttribType, currentOffset));
+ GrVertexAttrib currAttrib = {kVec2f_GrVertexAttribType, currentOffset};
+ attribs.push_back(currAttrib);
currentOffset += sizeof(GrPoint);
// Using per-vertex colors allows batching across colors. (A lot of rects in a row differing
@@ -103,7 +104,8 @@
drawState->hasSolidCoverage(drawState->getAttribBindings())) {
bindings |= GrDrawState::kColor_AttribBindingsBit;
drawState->setAttribIndex(GrDrawState::kColor_AttribIndex, attribs.count());
- attribs.push_back(GrVertexAttrib(kVec4ub_GrVertexAttribType, currentOffset));
+ currAttrib.set(kVec4ub_GrVertexAttribType, currentOffset);
+ attribs.push_back(currAttrib);
colorOffset = currentOffset;
currentOffset += sizeof(GrColor);
// We set the draw state's color to white here. This is done so that any batching performed
@@ -117,7 +119,8 @@
if (NULL != srcRect) {
bindings |= GrDrawState::ExplicitTexCoordAttribBindingsBit(stage);
drawState->setAttribIndex(GrDrawState::kTexCoord_AttribIndex, attribs.count());
- attribs.push_back(GrVertexAttrib(kVec2f_GrVertexAttribType, currentOffset));
+ currAttrib.set(kVec2f_GrVertexAttribType, currentOffset);
+ attribs.push_back(currAttrib);
texOffset = currentOffset;
currentOffset += sizeof(GrPoint);
explicitCoordMask = (1 << stage);
« src/gpu/GrContext.cpp ('K') | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698