aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ops/GrAtlasTextOp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/ops/GrAtlasTextOp.cpp')
-rw-r--r--src/gpu/ops/GrAtlasTextOp.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gpu/ops/GrAtlasTextOp.cpp b/src/gpu/ops/GrAtlasTextOp.cpp
index f0a9300d9e..2383510a47 100644
--- a/src/gpu/ops/GrAtlasTextOp.cpp
+++ b/src/gpu/ops/GrAtlasTextOp.cpp
@@ -318,19 +318,19 @@ bool GrAtlasTextOp::onCombineIfPossible(GrOp* t, const GrCaps& caps) {
// Keep the batch vertex buffer size below 32K so we don't have to create a special one
// We use the largest possible vertex size for this
static const int kVertexSize = sizeof(SkPoint) + sizeof(SkColor) + 2 * sizeof(uint16_t);
- static const int kMaxGlyphs = 32768 / (4 * kVertexSize);
+ static const int kMaxGlyphs = 32768 / (kVerticesPerGlyph * kVertexSize);
if (this->fNumGlyphs + that->fNumGlyphs > kMaxGlyphs) {
return false;
}
fNumGlyphs += that->numGlyphs();
- // Reallocate space for geo data if necessary and then import that's geo data.
+ // Reallocate space for geo data if necessary and then import that geo's data.
int newGeoCount = that->fGeoCount + fGeoCount;
// We reallocate at a rate of 1.5x to try to get better total memory usage
if (newGeoCount > fGeoDataAllocSize) {
- int newAllocSize = fGeoDataAllocSize + fGeoDataAllocSize/2;
+ int newAllocSize = fGeoDataAllocSize + fGeoDataAllocSize / 2;
while (newAllocSize < newGeoCount) {
newAllocSize += newAllocSize / 2;
}