Make drawRect preserve vertex attrib state and push/pop the geom sources.
Also, add some balancing calls for setIndexSource*()
Review URL: https://codereview.chromium.org/13468004
git-svn-id: http://skia.googlecode.com/svn/trunk@8499 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 85b2c83..1b62062 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -976,6 +976,7 @@
if (NULL != indices) {
target->setIndexSourceToArray(indices, indexCount);
target->drawIndexed(primitiveType, 0, 0, vertexCount, indexCount);
+ target->resetIndexSource();
} else {
target->drawNonIndexed(primitiveType, 0, vertexCount);
}