adding assert to GrAtlasTextContext
TBR=bsalomon@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/1241263003
diff --git a/src/gpu/GrAtlasTextBlob.cpp b/src/gpu/GrAtlasTextBlob.cpp
index d357145..3fb7ac9 100644
--- a/src/gpu/GrAtlasTextBlob.cpp
+++ b/src/gpu/GrAtlasTextBlob.cpp
@@ -57,7 +57,7 @@
SkASSERT(!rRun.fTypeface.get());
}
- // TODO BOUNDS ARE ALL MESSED UP
+ // We offset bounds right before flush time so they will not be correct here
//SkASSERT(lRun.fVertexBounds == rRun.fVertexBounds);
SkASSERT(lRun.fDescriptor.getDesc());
diff --git a/src/gpu/GrAtlasTextContext.cpp b/src/gpu/GrAtlasTextContext.cpp
index 0e901ae..b95c446 100644
--- a/src/gpu/GrAtlasTextContext.cpp
+++ b/src/gpu/GrAtlasTextContext.cpp
@@ -409,8 +409,7 @@
blob, x, y, drawFilter, clipRect, rt, clip, grPaint);
} else {
// If we can reuse the blob, then make sure we update the blob's viewmatrix, and x/y
- // offsets
- // TODO bounds are wrong
+ // offsets. Note, we offset the vertex bounds right before flushing
cacheBlob->fViewMatrix = viewMatrix;
cacheBlob->fX = x;
cacheBlob->fY = y;
@@ -1675,6 +1674,7 @@
}
glyph = blob->fGlyphs[glyphOffset];
SkASSERT(glyph);
+ SkASSERT(glyph->fMaskFormat == fMaskFormat);
if (!fFontCache->hasGlyph(glyph) &&
!strike->addGlyphToAtlas(batchTarget, glyph, scaler)) {