Index: gm/convexpolyeffect.cpp |
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp |
index 60b73c571d97a067d5b566d2ed0b88570dd65212..07d5fc2112f15a6bcf0f6d945f00ee0e865d3a9e 100644 |
--- a/gm/convexpolyeffect.cpp |
+++ b/gm/convexpolyeffect.cpp |
@@ -17,7 +17,6 @@ |
#include "GrContext.h" |
#include "GrDefaultGeoProcFactory.h" |
#include "GrPathUtils.h" |
-#include "GrResourceProvider.h" |
#include "GrTest.h" |
#include "GrTestBatch.h" |
#include "SkColorPriv.h" |
@@ -53,10 +52,8 @@ |
} |
void onGenerateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { |
- SkAutoTUnref<const GrIndexBuffer> indexBuffer( |
- batchTarget->resourceProvider()->refQuadIndexBuffer()); |
- |
size_t vertexStride = this->geometryProcessor()->getVertexStride(); |
+ |
const GrVertexBuffer* vertexBuffer; |
int firstVertex; |
@@ -65,7 +62,7 @@ |
&vertexBuffer, |
&firstVertex); |
- if (!vertices || !indexBuffer) { |
+ if (!vertices || !batchTarget->quadIndexBuffer()) { |
SkDebugf("Could not allocate buffers\n"); |
return; |
} |
@@ -85,7 +82,7 @@ |
drawInfo.setVertexCount(kVertsPerCubic); |
drawInfo.setStartIndex(0); |
drawInfo.setIndexCount(kIndicesPerCubic); |
- drawInfo.setIndexBuffer(indexBuffer); |
+ drawInfo.setIndexBuffer(batchTarget->quadIndexBuffer()); |
batchTarget->draw(drawInfo); |
} |