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

Unified Diff: src/core/SkRecordDraw.cpp

Issue 665103002: Dilate approximated text bounds to squelch recent assertion failure. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update unit test Created 6 years, 2 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 | tests/RecordDrawTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRecordDraw.cpp
diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp
index 0c3347ec55c790a95f129dbf485ae91d70cc8ad6..12579e9b658b3a0529d28efbb36295bcb3be1a39 100644
--- a/src/core/SkRecordDraw.cpp
+++ b/src/core/SkRecordDraw.cpp
@@ -473,8 +473,10 @@ private:
#ifdef SK_DEBUG
SkRect correct = *rect;
#endif
- const SkScalar yPad = 2.0f * paint.getTextSize(), // In practice, this seems to be enough.
- xPad = 4.0f * yPad; // Hack for very wide Github logo font.
+ // crbug.com/373785 ~~> xPad = 4x yPad
+ // crbug.com/424824 ~~> bump yPad from 2x text size to 2.5x
+ const SkScalar yPad = 2.5f * paint.getTextSize(),
+ xPad = 4.0f * yPad;
rect->outset(xPad, yPad);
#ifdef SK_DEBUG
SkPaint::FontMetrics metrics;
« no previous file with comments | « no previous file | tests/RecordDrawTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698