Exit early from 0 prim draws in GrDrawTarget
Review URL: http://codereview.appspot.com/4929045/ git-svn-id: http://skia.googlecode.com/svn/trunk@2159 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
52c748b169
commit
8214587a79
@ -658,8 +658,10 @@ void GrDrawTarget::drawIndexed(GrPrimitiveType type, int startVertex,
|
||||
GrCrash("Indexed drawing outside valid index range.");
|
||||
}
|
||||
#endif
|
||||
this->onDrawIndexed(type, startVertex, startIndex,
|
||||
vertexCount, indexCount);
|
||||
if (indexCount > 0) {
|
||||
this->onDrawIndexed(type, startVertex, startIndex,
|
||||
vertexCount, indexCount);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -686,7 +688,9 @@ void GrDrawTarget::drawNonIndexed(GrPrimitiveType type,
|
||||
GrCrash("Non-indexed drawing outside valid vertex range.");
|
||||
}
|
||||
#endif
|
||||
this->onDrawNonIndexed(type, startVertex, vertexCount);
|
||||
if (vertexCount > 0) {
|
||||
this->onDrawNonIndexed(type, startVertex, vertexCount);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user