Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1794)

Unified Diff: src/gpu/GrAtlasTextContext.cpp

Issue 1241263003: adding assert to GrAtlasTextContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrAtlasTextBlob.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAtlasTextContext.cpp
diff --git a/src/gpu/GrAtlasTextContext.cpp b/src/gpu/GrAtlasTextContext.cpp
index 0e901ae40cdab18f5f8896a807343ed8562cdc7a..b95c446532d9273c48536f8a15972e53e8fd661e 100644
--- a/src/gpu/GrAtlasTextContext.cpp
+++ b/src/gpu/GrAtlasTextContext.cpp
@@ -409,8 +409,7 @@ void GrAtlasTextContext::drawTextBlob(GrRenderTarget* rt,
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 @@ public:
}
glyph = blob->fGlyphs[glyphOffset];
SkASSERT(glyph);
+ SkASSERT(glyph->fMaskFormat == fMaskFormat);
if (!fFontCache->hasGlyph(glyph) &&
!strike->addGlyphToAtlas(batchTarget, glyph, scaler)) {
« no previous file with comments | « src/gpu/GrAtlasTextBlob.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698