Chromium Code Reviews| Index: src/gpu/batches/GrAtlasTextBatch.cpp |
| diff --git a/src/gpu/batches/GrAtlasTextBatch.cpp b/src/gpu/batches/GrAtlasTextBatch.cpp |
| index 8b890394060da5f18d4f2df9aef291ee1f3463f1..414fde99836b5b040ef68f6cddeb46addfb600d6 100644 |
| --- a/src/gpu/batches/GrAtlasTextBatch.cpp |
| +++ b/src/gpu/batches/GrAtlasTextBatch.cpp |
| @@ -119,7 +119,7 @@ void GrAtlasTextBatch::onPrepareDraws(Target* target) const { |
| target->initDraw(gp); |
| int glyphCount = this->numGlyphs(); |
| - const GrVertexBuffer* vertexBuffer; |
| + const GrBuffer* vertexBuffer; |
| void* vertices = target->makeVertexSpace(vertexStride, |
| glyphCount * kVerticesPerGlyph, |
| @@ -181,7 +181,7 @@ void GrAtlasTextBatch::onPrepareDraws(Target* target) const { |
| void GrAtlasTextBatch::flush(GrVertexBatch::Target* target, FlushInfo* flushInfo) const { |
| GrMesh mesh; |
| - int maxGlyphsPerDraw = flushInfo->fIndexBuffer->maxQuads(); |
| + int maxGlyphsPerDraw = flushInfo->fIndexBuffer->gpuMemorySize() / sizeof(uint16_t) / 6; |
|
jvanverth1
2016/03/24 19:21:01
needs a cast to int
Chris Dalton
2016/03/24 21:12:06
Done.
|
| mesh.initInstanced(kTriangles_GrPrimitiveType, flushInfo->fVertexBuffer, |
| flushInfo->fIndexBuffer, flushInfo->fVertexOffset, |
| kVerticesPerGlyph, kIndicesPerGlyph, flushInfo->fGlyphsToFlush, |