From d06693d9088f741c48a0b3b8449b3695447a86bc Mon Sep 17 00:00:00 2001 From: liyuqian Date: Mon, 13 Jun 2016 13:25:52 -0700 Subject: [PATCH] Quickly fix the double to SkScalar issue BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2060823004 Review-Url: https://codereview.chromium.org/2060823004 --- tools/viewer/Viewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp index 465a7aad4d..48d2c41112 100644 --- a/tools/viewer/Viewer.cpp +++ b/tools/viewer/Viewer.cpp @@ -350,7 +350,7 @@ void Viewer::drawSlide(SkCanvas* canvas, bool inSplitScreen) { SkRect contentRect = fWindow->getContentRect(); // If inSplitScreen, translate the image half screen to the right. // Thus we have two copies of the image on each half of the screen. - contentRect.fLeft += inSplitScreen ? (contentRect.fRight - contentRect.fLeft) * 0.5 : 0; + contentRect.fLeft += inSplitScreen ? (contentRect.fRight - contentRect.fLeft) * 0.5f : 0f; canvas->clipRect(contentRect); canvas->translate(contentRect.fLeft, contentRect.fTop); }