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

Issue 919693002: Make SkImageGenerator::getPixels() return an enum. (Closed)

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

Description

Make SkImageGenerator::getPixels() return an enum. The new enum describes the nature of the failure. This is in preparation for writing a replacement for SkImageDecoder, which will use this interface. Update the comments for getPixels() to specify what it means to pass an SkImageInfo with a different size. Make SkImageGenerator Noncopyable. Leave onGetYUV8Planes alone, since we have separate discussions regarding modifying that API. Make callers of SkImageDecoder consistently handle kPartialSuccess. Previously, some callers considered it a failure, and others considered it a success. BUG=skia:3257 Committed: https://skia.googlesource.com/skia/+/0864908ca50049d3d907fc5c3749bc8a436b4738

Patch Set 1 #

Total comments: 16

Patch Set 2 : Respond to comments. #

Patch Set 3 : Make kSuccess come first. #

Patch Set 4 : Stage the change for chromium #

Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -63 lines) Patch
M gyp/skia_for_chromium_defines.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M include/core/SkImageGenerator.h View 1 2 3 6 chunks +60 lines, -6 lines 0 comments Download
M src/core/SkImageGenerator.cpp View 1 2 3 3 chunks +28 lines, -13 lines 0 comments Download
M src/images/SkDecodingImageGenerator.cpp View 1 2 3 5 chunks +22 lines, -16 lines 0 comments Download
M src/lazy/SkCachingPixelRef.cpp View 1 chunk +9 lines, -3 lines 0 comments Download
M src/lazy/SkDiscardablePixelRef.cpp View 1 chunk +11 lines, -5 lines 0 comments Download
M src/ports/SkImageGenerator_skia.cpp View 1 2 3 3 chunks +11 lines, -11 lines 0 comments Download
M tests/CachedDecodingPixelRefTest.cpp View 1 2 3 2 chunks +9 lines, -9 lines 0 comments Download

Messages

Total messages: 15 (3 generated)
scroggo
As discussed elsewhere, this merges some of the ideas from SkCodec into SkImageGenerator. I've left ...
5 years, 10 months ago (2015-02-11 16:01:26 UTC) #2
scroggo
Ping! Derek and Mike, will you please review? I'd like to get an interface checked ...
5 years, 10 months ago (2015-02-12 13:37:16 UTC) #3
djsollen
looks good overall, just a few nits. https://codereview.chromium.org/919693002/diff/1/include/core/SkImageGenerator.h File include/core/SkImageGenerator.h (right): https://codereview.chromium.org/919693002/diff/1/include/core/SkImageGenerator.h#newcode135 include/core/SkImageGenerator.h:135: * to ...
5 years, 10 months ago (2015-02-12 14:22:15 UTC) #4
reed1
https://codereview.chromium.org/919693002/diff/1/include/core/SkImageGenerator.h File include/core/SkImageGenerator.h (right): https://codereview.chromium.org/919693002/diff/1/include/core/SkImageGenerator.h#newcode147 include/core/SkImageGenerator.h:147: Result getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, perhaps ...
5 years, 10 months ago (2015-02-12 14:46:08 UTC) #5
reed1
lgtm
5 years, 10 months ago (2015-02-12 14:46:20 UTC) #6
hal.canary
1gtm https://codereview.chromium.org/919693002/diff/1/include/core/SkImageGenerator.h File include/core/SkImageGenerator.h (right): https://codereview.chromium.org/919693002/diff/1/include/core/SkImageGenerator.h#newcode83 include/core/SkImageGenerator.h:83: * The generator cannot convert to match the ...
5 years, 10 months ago (2015-02-12 14:54:59 UTC) #7
scroggo
https://codereview.chromium.org/919693002/diff/1/include/core/SkImageGenerator.h File include/core/SkImageGenerator.h (right): https://codereview.chromium.org/919693002/diff/1/include/core/SkImageGenerator.h#newcode83 include/core/SkImageGenerator.h:83: * The generator cannot convert to match the request. ...
5 years, 10 months ago (2015-02-12 15:28:36 UTC) #9
scroggo
I just added changes to help with staging in Chrome. Chrome overrides onGetPixels, so we ...
5 years, 10 months ago (2015-02-13 16:52:14 UTC) #10
scroggo
On 2015/02/13 16:52:14, scroggo wrote: > I just added changes to help with staging in ...
5 years, 10 months ago (2015-02-13 18:37:06 UTC) #11
reed1
api lgtm
5 years, 10 months ago (2015-02-13 19:02:19 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/919693002/60001
5 years, 10 months ago (2015-02-13 19:05:45 UTC) #14
commit-bot: I haz the power
5 years, 10 months ago (2015-02-13 19:13:38 UTC) #15
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://skia.googlesource.com/skia/+/0864908ca50049d3d907fc5c3749bc8a436b4738

Powered by Google App Engine
This is Rietveld 408576698