aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-04-13 08:14:22 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-13 08:14:22 -0700
commit33b6b8ef99f7b2df498f7a3e242ffa197e1fc734 (patch)
treedbd42b2afc7fd81b671a6bbe2369e38e1b9d6cd0 /src
parent09e127bd38d4f972134afca77184b217a9708b3a (diff)
Allow a small tolerance in GrAtlasTextBatch bounds test.
Diffstat (limited to 'src')
-rw-r--r--src/gpu/batches/GrAtlasTextBatch.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gpu/batches/GrAtlasTextBatch.cpp b/src/gpu/batches/GrAtlasTextBatch.cpp
index 03b3ad0363..b23a4ccd7b 100644
--- a/src/gpu/batches/GrAtlasTextBatch.cpp
+++ b/src/gpu/batches/GrAtlasTextBatch.cpp
@@ -164,7 +164,10 @@ void GrAtlasTextBatch::onPrepareDraws(Target* target) const {
if (this->usesDistanceFields()) {
args.fViewMatrix.mapRect(&rect);
}
- SkASSERT(fBounds.contains(rect));
+ // Allow for small numerical error in the bounds.
+ SkRect bounds = fBounds;
+ bounds.outset(0.001f, 0.001f);
+ SkASSERT(bounds.contains(rect));
#endif
currVertex += byteCount;