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

Unified Diff: ui/gfx/platform_font_pango.cc

Issue 122443005: replace deprecated SkScalarRound/Floor/Ceil calls with more explicit variants (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 | « ui/gfx/path_x11.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/platform_font_pango.cc
diff --git a/ui/gfx/platform_font_pango.cc b/ui/gfx/platform_font_pango.cc
index a4c6f89195f211a8466291346ff5b6477cb9810a..c0c19144c11398dda64877c1eb4a16398b9208e5 100644
--- a/ui/gfx/platform_font_pango.cc
+++ b/ui/gfx/platform_font_pango.cc
@@ -190,7 +190,7 @@ int PlatformFontPango::GetCapHeight() const {
int PlatformFontPango::GetAverageCharacterWidth() const {
const_cast<PlatformFontPango*>(this)->InitPangoMetrics();
- return SkScalarRound(average_width_pixels_);
+ return SkScalarRoundToInt(average_width_pixels_);
}
int PlatformFontPango::GetStringWidth(const base::string16& text) const {
@@ -337,9 +337,9 @@ void PlatformFontPango::InitWithTypefaceNameSizeAndStyle(
PaintSetup(&paint);
paint.getFontMetrics(&metrics);
- ascent_pixels_ = SkScalarCeil(-metrics.fAscent);
- height_pixels_ = ascent_pixels_ + SkScalarCeil(metrics.fDescent);
- cap_height_pixels_ = SkScalarCeil(metrics.fCapHeight);
+ ascent_pixels_ = SkScalarCeilToInt(-metrics.fAscent);
+ height_pixels_ = ascent_pixels_ + SkScalarCeilToInt(metrics.fDescent);
+ cap_height_pixels_ = SkScalarCeilToInt(metrics.fCapHeight);
}
void PlatformFontPango::InitFromPlatformFont(const PlatformFontPango* other) {
« no previous file with comments | « ui/gfx/path_x11.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698