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

Issue 1313233007: Remove jpegs with uninitialized memory from Gold (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

Remove jpegs with uninitialized memory from Gold BitmapRegionSampler (uses SkImageDecoder) will often scale to a power of 2 regardless of the sampleSize requested. This is skbug.com/4319. Consider a 60x60 image. To decode a subset with sample size 3, we might ask for the following. [x, y, w, h] = [-15, -15, 30, 30] sampleSize = 3 Since w = 30 and h = 30, this should give us a 10x10 result. Only the bottom right 5x5 quadrant of this 10x10 subset will actually be in the image. We should get a 5 pixel border on the top and left because we ask for 15 extra pixels on the top and left. Unfortunately, SkImageDecoder will take our requested sample size of 3, and then decide to use a sample size of 2. Not only will it scale the image by 2, but it will also scale the border by 2. So while we are expecting pixel data to begin at offset (5, 5) of the result bitmap, it actually begins at offset (7, 7). Making things worse, the pixels between (5, 5) and (7, 7) are uninitialized, causing problems on Gold. Options for fixing this include: (1) Not testing decodes with a border. (2) Changing the test to check the size of the output bitmap. (3) Disable the tests. I think it's best to just disable these tests. We know they don't work, so why do we need to see the results on Gold? BUG=skia:4319 Committed: https://skia.googlesource.com/skia/+/6efbe0537732a729d5bd500707dd0d8b0fc83553

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -6 lines) Patch
M dm/DM.cpp View 3 chunks +16 lines, -6 lines 2 comments Download

Depends on Patchset:

Messages

Total messages: 8 (2 generated)
msarett
5 years, 3 months ago (2015-09-09 21:09:05 UTC) #2
scroggo
The code changes LGTM. I do have some questions about the description though: >Remove jpegs ...
5 years, 3 months ago (2015-09-11 14:59:47 UTC) #3
msarett
On 2015/09/11 14:59:47, scroggo wrote: > The code changes LGTM. I do have some questions ...
5 years, 3 months ago (2015-09-11 15:21:40 UTC) #4
msarett
Let me know if this makes more sense. https://codereview.chromium.org/1313233007/diff/1/dm/DM.cpp File dm/DM.cpp (right): https://codereview.chromium.org/1313233007/diff/1/dm/DM.cpp#newcode408 dm/DM.cpp:408: const ...
5 years, 3 months ago (2015-09-11 15:28:20 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1313233007/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1313233007/1
5 years, 3 months ago (2015-09-11 15:55:39 UTC) #7
commit-bot: I haz the power
5 years, 3 months ago (2015-09-11 16:01:20 UTC) #8
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://skia.googlesource.com/skia/+/6efbe0537732a729d5bd500707dd0d8b0fc83553

Powered by Google App Engine
This is Rietveld 408576698