aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-07-21 12:56:56 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-21 12:56:56 -0700
commit7e7b5c5d0781c0bb8a83cb66708523baa4787fa8 (patch)
tree61d3b9978c402d85aae4e6a17ef8c5d162d4b586 /src
parentcd1930d4f19297c4089d7cb278243e4815c5793d (diff)
adding assert to GrAtlasTextContext
TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1241263003
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrAtlasTextBlob.cpp2
-rw-r--r--src/gpu/GrAtlasTextContext.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/gpu/GrAtlasTextBlob.cpp b/src/gpu/GrAtlasTextBlob.cpp
index d357145cbc..3fb7ac99c1 100644
--- a/src/gpu/GrAtlasTextBlob.cpp
+++ b/src/gpu/GrAtlasTextBlob.cpp
@@ -57,7 +57,7 @@ void GrAtlasTextBlob::AssertEqual(const GrAtlasTextBlob& l, const GrAtlasTextBlo
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 0e901ae40c..b95c446532 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)) {