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

Issue 1288963002: Provides multiple implementations of Android's SkBitmapRegionDecoder (Closed)

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

Description

Provides various implementations of Android's SkBitmapRegionDecoder. Implements testing in DM for these implementations. nanobench testing will follow after this. TBR=scroggo BUG=skia: Committed: https://skia.googlesource.com/skia/+/76f755e6d54a32f9887ad254ce59a3a62f28bde4 Committed: https://skia.googlesource.com/skia/+/a5783aeff042ccaf517e50dee3660a4925f5f694

Patch Set 1 : #

Total comments: 53

Patch Set 2 : Added kSrc_Mode and setFilterQuality #

Patch Set 3 : Response to Leon's comments #

Total comments: 14

Patch Set 4 : Rebase #

Patch Set 5 : Response to comments from patch set 3 #

Patch Set 6 : Use nullptr instead of NULL #

Total comments: 20

Patch Set 7 : Rebase #

Patch Set 8 : Response to comments #

Total comments: 42

Patch Set 9 : Response to comments #

Total comments: 10

Patch Set 10 : Rebase #

Patch Set 11 : Share set_subset_region code #

Patch Set 12 : Acknowledged a subtle bug in the test #

Total comments: 10

Patch Set 13 : Final response to comments #

Patch Set 14 : Changed name to SkBitmapRegionDecoderInterface to avoid conflict with Android #

Patch Set 15 : Win compile fix #

Patch Set 16 : Fix more win errors #

Patch Set 17 : Move BRD code to tools #

Patch Set 18 : Disable png subsets for SkImageDecoder #

Unified diffs Side-by-side diffs Delta from patch set Stats (+775 lines, -9 lines) Patch
M dm/DM.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +120 lines, -7 lines 0 comments Download
M dm/DMSrcSink.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +29 lines, -0 lines 0 comments Download
M dm/DMSrcSink.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +158 lines, -2 lines 0 comments Download
M gyp/dm.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M gyp/tools.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +16 lines, -0 lines 0 comments Download
A tools/SkBitmapRegionCanvas.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +43 lines, -0 lines 0 comments Download
A tools/SkBitmapRegionCanvas.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +189 lines, -0 lines 0 comments Download
A tools/SkBitmapRegionDecoderInterface.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +77 lines, -0 lines 0 comments Download
A tools/SkBitmapRegionDecoderInterface.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +51 lines, -0 lines 0 comments Download
A tools/SkBitmapRegionSampler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +41 lines, -0 lines 0 comments Download
A tools/SkBitmapRegionSampler.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +50 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 48 (19 generated)
msarett
https://codereview.chromium.org/1288963002/diff/40001/dm/DMSrcSink.cpp File dm/DMSrcSink.cpp (right): https://codereview.chromium.org/1288963002/diff/40001/dm/DMSrcSink.cpp#newcode112 dm/DMSrcSink.cpp:112: // Use a border to test what happens when ...
5 years, 4 months ago (2015-08-13 15:16:34 UTC) #4
scroggo
Could you add some more explanation in your description? Something like provides various implementations for ...
5 years, 4 months ago (2015-08-13 16:53:08 UTC) #5
msarett
Would this change break Android if it lands? I'm wondering because there are now two ...
5 years, 4 months ago (2015-08-13 18:10:23 UTC) #6
msarett
Mike, SkBitmapRegionCanvas may be interesting to you.
5 years, 4 months ago (2015-08-18 14:35:22 UTC) #8
scroggo
https://codereview.chromium.org/1288963002/diff/40001/dm/DMSrcSink.cpp File dm/DMSrcSink.cpp (right): https://codereview.chromium.org/1288963002/diff/40001/dm/DMSrcSink.cpp#newcode112 dm/DMSrcSink.cpp:112: // Use a border to test what happens when ...
5 years, 3 months ago (2015-08-28 13:49:44 UTC) #9
msarett
https://codereview.chromium.org/1288963002/diff/40001/dm/DMSrcSink.cpp File dm/DMSrcSink.cpp (right): https://codereview.chromium.org/1288963002/diff/40001/dm/DMSrcSink.cpp#newcode112 dm/DMSrcSink.cpp:112: // Use a border to test what happens when ...
5 years, 3 months ago (2015-08-28 18:45:51 UTC) #12
scroggo
https://codereview.chromium.org/1288963002/diff/160001/dm/DM.cpp File dm/DM.cpp (right): https://codereview.chromium.org/1288963002/diff/160001/dm/DM.cpp#newcode294 dm/DM.cpp:294: push_src("image", "brd_canvas_kN32", new BRDSrc(path, I think this can be ...
5 years, 3 months ago (2015-09-01 22:05:28 UTC) #13
msarett
https://codereview.chromium.org/1288963002/diff/160001/dm/DM.cpp File dm/DM.cpp (right): https://codereview.chromium.org/1288963002/diff/160001/dm/DM.cpp#newcode294 dm/DM.cpp:294: push_src("image", "brd_canvas_kN32", new BRDSrc(path, On 2015/09/01 22:05:28, scroggo wrote: ...
5 years, 3 months ago (2015-09-02 18:02:24 UTC) #14
scroggo
https://codereview.chromium.org/1288963002/diff/160001/dm/DMSrcSink.cpp File dm/DMSrcSink.cpp (right): https://codereview.chromium.org/1288963002/diff/160001/dm/DMSrcSink.cpp#newcode84 dm/DMSrcSink.cpp:84: return Error::Nonfatal("Testing to multiple backends is uninteresting."); On 2015/09/02 ...
5 years, 3 months ago (2015-09-02 21:32:25 UTC) #15
msarett
https://codereview.chromium.org/1288963002/diff/160001/dm/DMSrcSink.cpp File dm/DMSrcSink.cpp (right): https://codereview.chromium.org/1288963002/diff/160001/dm/DMSrcSink.cpp#newcode84 dm/DMSrcSink.cpp:84: return Error::Nonfatal("Testing to multiple backends is uninteresting."); On 2015/09/02 ...
5 years, 3 months ago (2015-09-03 19:20:52 UTC) #16
scroggo
https://codereview.chromium.org/1288963002/diff/200001/src/utils/SkBitmapRegionCanvas.cpp File src/utils/SkBitmapRegionCanvas.cpp (right): https://codereview.chromium.org/1288963002/diff/200001/src/utils/SkBitmapRegionCanvas.cpp#newcode111 src/utils/SkBitmapRegionCanvas.cpp:111: // Use a canvas to crop and scale to ...
5 years, 3 months ago (2015-09-03 20:07:41 UTC) #17
msarett
https://codereview.chromium.org/1288963002/diff/200001/src/utils/SkBitmapRegionCanvas.cpp File src/utils/SkBitmapRegionCanvas.cpp (right): https://codereview.chromium.org/1288963002/diff/200001/src/utils/SkBitmapRegionCanvas.cpp#newcode111 src/utils/SkBitmapRegionCanvas.cpp:111: // Use a canvas to crop and scale to ...
5 years, 3 months ago (2015-09-03 22:10:30 UTC) #18
scroggo
lgtm with some comments https://codereview.chromium.org/1288963002/diff/220001/src/utils/SkBitmapRegionCanvas.cpp File src/utils/SkBitmapRegionCanvas.cpp (right): https://codereview.chromium.org/1288963002/diff/220001/src/utils/SkBitmapRegionCanvas.cpp#newcode29 src/utils/SkBitmapRegionCanvas.cpp:29: return SkTMax(1, dimension / sampleSize); ...
5 years, 3 months ago (2015-09-04 17:55:07 UTC) #20
msarett
https://codereview.chromium.org/1288963002/diff/220001/src/utils/SkBitmapRegionCanvas.cpp File src/utils/SkBitmapRegionCanvas.cpp (right): https://codereview.chromium.org/1288963002/diff/220001/src/utils/SkBitmapRegionCanvas.cpp#newcode29 src/utils/SkBitmapRegionCanvas.cpp:29: return SkTMax(1, dimension / sampleSize); On 2015/09/04 17:55:06, scroggo ...
5 years, 3 months ago (2015-09-04 18:54:11 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1288963002/330001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1288963002/330001
5 years, 3 months ago (2015-09-04 19:30:02 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: Build-Win-MSVC-x86-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-MSVC-x86-Debug-Trybot/builds/3098) Build-Win-MSVC-x86_64-Debug-Trybot on client.skia.compile (JOB_FAILED, ...
5 years, 3 months ago (2015-09-04 19:31:58 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1288963002/340012 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1288963002/340012
5 years, 3 months ago (2015-09-04 19:46:34 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: Build-Win-MSVC-x86_64-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-MSVC-x86_64-Debug-Trybot/builds/3157)
5 years, 3 months ago (2015-09-04 19:49:08 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1288963002/360001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1288963002/360001
5 years, 3 months ago (2015-09-04 19:55:45 UTC) #34
commit-bot: I haz the power
Committed patchset #16 (id:360001) as https://skia.googlesource.com/skia/+/76f755e6d54a32f9887ad254ce59a3a62f28bde4
5 years, 3 months ago (2015-09-04 20:00:54 UTC) #35
jcgregorio
On 2015/09/04 at 20:00:54, commit-bot wrote: > Committed patchset #16 (id:360001) as https://skia.googlesource.com/skia/+/76f755e6d54a32f9887ad254ce59a3a62f28bde4 This change ...
5 years, 3 months ago (2015-09-08 08:08:51 UTC) #36
msarett
Sorry, you're right, this needs a revert and a manual roll. Will do when I ...
5 years, 3 months ago (2015-09-08 12:02:07 UTC) #37
mtklein
On 2015/09/08 12:02:07, msarett wrote: > Sorry, you're right, this needs a revert and a ...
5 years, 3 months ago (2015-09-08 13:16:52 UTC) #38
msarett
A revert of this CL (patchset #16 id:360001) has been created in https://codereview.chromium.org/1322773004/ by msarett@google.com. ...
5 years, 3 months ago (2015-09-08 13:44:44 UTC) #39
msarett
(1) Moved code to tools directory. (2) Disabled the testing of pngs using SkImageDecoder. I ...
5 years, 3 months ago (2015-09-08 22:29:13 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1288963002/440001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1288963002/440001
5 years, 3 months ago (2015-09-08 22:30:12 UTC) #45
commit-bot: I haz the power
Committed patchset #18 (id:440001) as https://skia.googlesource.com/skia/+/a5783aeff042ccaf517e50dee3660a4925f5f694
5 years, 3 months ago (2015-09-08 22:35:35 UTC) #46
scroggo
On 2015/09/08 22:29:13, msarett wrote: > (1) Moved code to tools directory. > > (2) ...
5 years, 3 months ago (2015-09-18 17:58:08 UTC) #47
msarett
5 years, 3 months ago (2015-09-18 18:40:23 UTC) #48
Message was sent while issue was closed.
On 2015/09/18 17:58:08, scroggo wrote:
> On 2015/09/08 22:29:13, msarett wrote:
> > (1) Moved code to tools directory.
> > 
> > (2) Disabled the testing of pngs using SkImageDecoder.
> > 
> > I tried to run png and jpeg partial decodes on my Linux
> > machine in order to figure out what was causing the issues
> > on our bots.
> > 
> > I never succeeded with jpeg - just got seg faults.  
> > Maybe I just messed up with changing the Android
> > specific memory manager etc.
> 
> What was the case where you got segfaults with jpeg? Is this a problem?
> 

Sorry this comment was misleading.  The seg faults indicate that I failed
to duplicate our Android jpeg subset decoding on my desktop machine.  I'm
not sure why I failed, I gave up because I found the bug I was looking for
in png.  Certainly if the seg faults were occurring on our Android devices,
our tests would crash and we would know.

I thought it was relevant to mention that I failed to rule out memory
leaks in jpeg subset decoding, especially since I wasn't sure at the time
if the png fix would be sufficient.  Since removing the png leak fixed the
Android bots, I assumed that the jpeg decodes were ok.

Maybe it's worth noting that our SkImageDecoder png subset test leaks memory and
has been running (and continues to run) on the Android bots with no problem
since I've been here.  So it is possible that there are issues with jpeg that
we don't know about.  I think that's ok, since we intend to replace it anyway.
It will be nice when we no longer have code that we only test on Android,
since valgrind/ASAN etc. will expose these types of issues.

> > 
> > With png, I saw significant memory leaks in our forked
> > copy of libpng.  I disabled testing of pngs in this mode
> > for now and will try to recommit.  Fingers crossed that
> > everything works, but I think the bots will tell us if
> > there are remaining issues.

Powered by Google App Engine
This is Rietveld 408576698