diff options
Diffstat (limited to 'chromium/ui/native_theme/caption_style_win.cc')
-rw-r--r-- | chromium/ui/native_theme/caption_style_win.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chromium/ui/native_theme/caption_style_win.cc b/chromium/ui/native_theme/caption_style_win.cc index 566de5e13a4..b147e53f039 100644 --- a/chromium/ui/native_theme/caption_style_win.cc +++ b/chromium/ui/native_theme/caption_style_win.cc @@ -11,12 +11,12 @@ #include "base/check_op.h" #include "base/notreached.h" +#include "base/numerics/safe_conversions.h" #include "base/win/core_winrt_util.h" #include "base/win/windows_version.h" #include "skia/ext/skia_utils_win.h" #include "ui/base/ui_base_features.h" #include "ui/gfx/color_utils.h" -#include "ui/gfx/geometry/safe_integer_conversions.h" namespace CC = ABI::Windows::Media::ClosedCaptioning; @@ -122,9 +122,9 @@ SkAlpha GetCaptionOpacity(CC::ClosedCaptionOpacity caption_opacity) { case CC::ClosedCaptionOpacity_ZeroPercent: return SK_AlphaTRANSPARENT; case CC::ClosedCaptionOpacity_TwentyFivePercent: - return gfx::ToRoundedInt(SK_AlphaOPAQUE * 0.25); + return base::ClampRound<SkAlpha>(SK_AlphaOPAQUE * 0.25); case CC::ClosedCaptionOpacity_SeventyFivePercent: - return gfx::ToRoundedInt(SK_AlphaOPAQUE * 0.75); + return base::ClampRound<SkAlpha>(SK_AlphaOPAQUE * 0.75); case CC::ClosedCaptionOpacity_OneHundredPercent: case CC::ClosedCaptionOpacity_Default: default: |