6efbe05377
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 Review URL: https://codereview.chromium.org/1313233007 |
||
---|---|---|
.. | ||
DM.cpp | ||
DMGpuSupport.h | ||
DMJsonWriter.cpp | ||
DMJsonWriter.h | ||
DMSrcSink.cpp | ||
DMSrcSink.h | ||
DMSrcSinkAndroid.cpp | ||
DMSrcSinkAndroid.h |