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

Issue 1356923002: Use rounding when converting desiredScale to a sampleSize (Closed)

Created:
5 years, 3 months ago by msarett
Modified:
5 years, 3 months ago
Reviewers:
scroggo
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Use rounding when converting desiredScale to a sampleSize Right now we have a bug in Gold where some images are labeled _0.167 and others are labeled _0.166. They are all 1/6 scales and should be labeled the same way and compared. The fix involves changing 0.166 to 0.167 in the list of scales that we test on, but SkScaledCodec does not scale to 0.167 as I expected. SkScaledCodec converts 0.167 to sampleSize = 5.999 and then casts to sampleSize = 5. I would argue that we should do a true round, so 0.167 represents a sampleSize of 6. In general, this CL change onGetScaledDimensions so that we now round desiredScale to the nearest sampleSize. BUG=skia: Committed: https://skia.googlesource.com/skia/+/6c50a8f4ab0747b319914c4b600a2e74c6d6e721

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -2 lines) Patch
M dm/DM.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/codec/SkScaledCodec.cpp View 1 chunk +1 line, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 6 (2 generated)
msarett
5 years, 3 months ago (2015-09-18 15:26:21 UTC) #2
scroggo
lgtm
5 years, 3 months ago (2015-09-18 15:57:26 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1356923002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1356923002/1
5 years, 3 months ago (2015-09-18 18:17:20 UTC) #5
commit-bot: I haz the power
5 years, 3 months ago (2015-09-18 18:24:47 UTC) #6
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://skia.googlesource.com/skia/+/6c50a8f4ab0747b319914c4b600a2e74c6d6e721

Powered by Google App Engine
This is Rietveld 408576698