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

Unified Diff: src/gpu/batches/GrAtlasTextBatch.cpp

Issue 1882833002: Allow a small tolerance in GrAtlasTextBatch bounds test. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: speeling Created 4 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrAtlasTextBatch.cpp
diff --git a/src/gpu/batches/GrAtlasTextBatch.cpp b/src/gpu/batches/GrAtlasTextBatch.cpp
index 03b3ad03632dc808759dbd5c1628cd62a43d637d..b23a4ccd7be380ae2860ef81cc50383947e6a350 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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698