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

Unified Diff: ui/views/color_chooser/color_chooser_view.cc

Issue 2693423004: SkScalarMul is deprecated (Closed)
Patch Set: undo the ImageGenerator flag change Created 3 years, 10 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/render_text.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/color_chooser/color_chooser_view.cc
diff --git a/ui/views/color_chooser/color_chooser_view.cc b/ui/views/color_chooser/color_chooser_view.cc
index 411cdb9885b8098e8da13dff1eb5c06dc0c3eb59..eefbfdf1a39c74b0f91053aec65787b5ada71fa6 100644
--- a/ui/views/color_chooser/color_chooser_view.cc
+++ b/ui/views/color_chooser/color_chooser_view.cc
@@ -264,10 +264,8 @@ void ColorChooserView::SaturationValueView::OnSaturationValueChanged(
SkScalar saturation,
SkScalar value) {
SkScalar scalar_size = SkIntToScalar(kSaturationValueSize - 1);
- int x = SkScalarFloorToInt(SkScalarMul(saturation, scalar_size)) +
- kBorderWidth;
- int y = SkScalarFloorToInt(SkScalarMul(SK_Scalar1 - value, scalar_size)) +
- kBorderWidth;
+ int x = SkScalarFloorToInt(saturation * scalar_size) + kBorderWidth;
+ int y = SkScalarFloorToInt((SK_Scalar1 - value) * scalar_size) + kBorderWidth;
if (gfx::Point(x, y) == marker_position_)
return;
« no previous file with comments | « ui/gfx/render_text.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698