| Index: src/gpu/GrAtlasTextContext.cpp
|
| diff --git a/src/gpu/GrAtlasTextContext.cpp b/src/gpu/GrAtlasTextContext.cpp
|
| index 33e4f7ed86237dba488e395e25978f81e3e8e6ca..14930fa4a3008860715dc9b5477ab3aa18c316c2 100644
|
| --- a/src/gpu/GrAtlasTextContext.cpp
|
| +++ b/src/gpu/GrAtlasTextContext.cpp
|
| @@ -13,7 +13,6 @@
|
| #include "GrDrawTarget.h"
|
| #include "GrFontScaler.h"
|
| #include "GrIndexBuffer.h"
|
| -#include "GrResourceProvider.h"
|
| #include "GrStrokeInfo.h"
|
| #include "GrTextBlobCache.h"
|
| #include "GrTexturePriv.h"
|
| @@ -1515,16 +1514,14 @@
|
|
|
| int glyphCount = this->numGlyphs();
|
| int instanceCount = fInstanceCount;
|
| - SkAutoTUnref<const GrIndexBuffer> indexBuffer(
|
| - batchTarget->resourceProvider()->refQuadIndexBuffer());
|
| -
|
| const GrVertexBuffer* vertexBuffer;
|
| int firstVertex;
|
| +
|
| void* vertices = batchTarget->vertexPool()->makeSpace(vertexStride,
|
| glyphCount * kVerticesPerGlyph,
|
| &vertexBuffer,
|
| &firstVertex);
|
| - if (!vertices || !indexBuffer) {
|
| + if (!vertices) {
|
| SkDebugf("Could not allocate vertices\n");
|
| return;
|
| }
|
| @@ -1532,7 +1529,8 @@
|
| unsigned char* currVertex = reinterpret_cast<unsigned char*>(vertices);
|
|
|
| // setup drawinfo
|
| - int maxInstancesPerDraw = indexBuffer->maxQuads();
|
| + const GrIndexBuffer* quadIndexBuffer = batchTarget->quadIndexBuffer();
|
| + int maxInstancesPerDraw = quadIndexBuffer->maxQuads();
|
|
|
| GrDrawTarget::DrawInfo drawInfo;
|
| drawInfo.setPrimitiveType(kTriangles_GrPrimitiveType);
|
| @@ -1542,7 +1540,7 @@
|
| drawInfo.setIndicesPerInstance(kIndicesPerGlyph);
|
| drawInfo.adjustStartVertex(firstVertex);
|
| drawInfo.setVertexBuffer(vertexBuffer);
|
| - drawInfo.setIndexBuffer(indexBuffer);
|
| + drawInfo.setIndexBuffer(quadIndexBuffer);
|
|
|
| // We cache some values to avoid going to the glyphcache for the same fontScaler twice
|
| // in a row
|
|
|