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

Issue 2000713003: Add SkColorSpace to SkImageInfo (Closed)

Created:
4 years, 7 months ago by msarett
Modified:
4 years, 6 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@public
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Total comments: 2

Patch Set 3 : Rebase #

Patch Set 4 : Check for 2.2 or linear gamma #

Total comments: 4

Patch Set 5 : Response to comments #

Patch Set 6 : Add SkColorSpace as alternate option #

Patch Set 7 : #

Patch Set 8 : Ref counting fixes and other fixes #

Total comments: 2

Patch Set 9 : Fix uses of SkImageInfo #

Patch Set 10 : #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -26 lines) Patch
M include/codec/SkEncodedInfo.h View 1 2 3 4 5 3 chunks +8 lines, -8 lines 0 comments Download
M include/core/SkImageInfo.h View 1 2 3 4 5 6 7 8 9 10 chunks +38 lines, -13 lines 7 comments Download
M src/codec/SkCodec.cpp View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M src/core/SkBitmap.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -0 lines 0 comments Download
M src/core/SkImageInfo.cpp View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M src/core/SkMipMap.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M tests/ImageIsOpaqueTest.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 41 (16 generated)
msarett
https://codereview.chromium.org/2000713003/diff/1/include/codec/SkEncodedInfo.h File include/codec/SkEncodedInfo.h (left): https://codereview.chromium.org/2000713003/diff/1/include/codec/SkEncodedInfo.h#oldcode120 include/codec/SkEncodedInfo.h:120: SkColorProfileType profileType = SkDefaultColorProfile(); I don't feel good about ...
4 years, 7 months ago (2016-05-20 16:55:37 UTC) #3
herb_g
https://codereview.chromium.org/2000713003/diff/20001/include/core/SkImageInfo.h File include/core/SkImageInfo.h (right): https://codereview.chromium.org/2000713003/diff/20001/include/core/SkImageInfo.h#newcode246 include/core/SkImageInfo.h:246: sk_sp<SkColorSpace> colorSpace() const { return fColorSpace; } Can we ...
4 years, 7 months ago (2016-05-20 21:19:13 UTC) #4
msarett
This looks much simpler after a rebase. https://codereview.chromium.org/2000713003/diff/20001/include/core/SkImageInfo.h File include/core/SkImageInfo.h (right): https://codereview.chromium.org/2000713003/diff/20001/include/core/SkImageInfo.h#newcode246 include/core/SkImageInfo.h:246: sk_sp<SkColorSpace> colorSpace() ...
4 years, 7 months ago (2016-05-23 18:29:37 UTC) #5
reed1
https://codereview.chromium.org/2000713003/diff/60001/include/core/SkImageInfo.h File include/core/SkImageInfo.h (right): https://codereview.chromium.org/2000713003/diff/60001/include/core/SkImageInfo.h#newcode245 include/core/SkImageInfo.h:245: SkColorProfileType profileType() const { return fProfileType; } would this ...
4 years, 7 months ago (2016-05-24 16:06:34 UTC) #6
msarett
https://codereview.chromium.org/2000713003/diff/60001/include/core/SkImageInfo.h File include/core/SkImageInfo.h (right): https://codereview.chromium.org/2000713003/diff/60001/include/core/SkImageInfo.h#newcode245 include/core/SkImageInfo.h:245: SkColorProfileType profileType() const { return fProfileType; } On 2016/05/24 ...
4 years, 7 months ago (2016-05-24 19:01:47 UTC) #7
reed1
I'm still foggy here. My first thought (not always to be trusted) would be that ...
4 years, 7 months ago (2016-05-24 19:10:23 UTC) #8
msarett
Leaving profile type alone, adding SkColorSpace for us to see if it works to start ...
4 years, 7 months ago (2016-05-25 18:22:26 UTC) #10
reed1
lgtm
4 years, 7 months ago (2016-05-25 18:38:12 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2000713003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2000713003/140001
4 years, 7 months ago (2016-05-25 18:39:00 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/builds/8712)
4 years, 7 months ago (2016-05-25 18:51:11 UTC) #15
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2000713003/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2000713003/160001
4 years, 7 months ago (2016-05-25 21:04:44 UTC) #17
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/builds/8713)
4 years, 7 months ago (2016-05-25 21:11:55 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2000713003/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2000713003/180001
4 years, 7 months ago (2016-05-26 13:41:56 UTC) #22
msarett
Please take another look... I've needed to make numerous fixes. I think I've found all ...
4 years, 7 months ago (2016-05-26 13:43:05 UTC) #23
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-26 13:56:47 UTC) #25
commit-bot: I haz the power
Dry run: None
4 years, 7 months ago (2016-05-26 13:56:55 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2000713003/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2000713003/200001
4 years, 6 months ago (2016-05-27 13:43:54 UTC) #28
msarett
Cleaned up some of the fixes a little bit. I'll probably try to land this ...
4 years, 6 months ago (2016-05-27 13:45:45 UTC) #29
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-05-27 13:58:26 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2000713003/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2000713003/220001
4 years, 6 months ago (2016-05-27 14:26:18 UTC) #34
commit-bot: I haz the power
Committed patchset #10 (id:220001) as https://skia.googlesource.com/skia/+/23c5110ba291cfc303e3fdc73af99cd3d595df67
4 years, 6 months ago (2016-05-27 14:39:05 UTC) #36
scroggo
https://codereview.chromium.org/2000713003/diff/220001/include/core/SkImageInfo.h File include/core/SkImageInfo.h (right): https://codereview.chromium.org/2000713003/diff/220001/include/core/SkImageInfo.h#newcode244 include/core/SkImageInfo.h:244: SkColorSpace* colorSpace() const { return fColorSpace.get(); } Now that ...
4 years, 6 months ago (2016-05-31 13:48:25 UTC) #38
msarett
https://codereview.chromium.org/2000713003/diff/220001/include/core/SkImageInfo.h File include/core/SkImageInfo.h (right): https://codereview.chromium.org/2000713003/diff/220001/include/core/SkImageInfo.h#newcode244 include/core/SkImageInfo.h:244: SkColorSpace* colorSpace() const { return fColorSpace.get(); } On 2016/05/31 ...
4 years, 6 months ago (2016-05-31 14:30:09 UTC) #39
scroggo
https://codereview.chromium.org/2000713003/diff/220001/include/core/SkImageInfo.h File include/core/SkImageInfo.h (right): https://codereview.chromium.org/2000713003/diff/220001/include/core/SkImageInfo.h#newcode244 include/core/SkImageInfo.h:244: SkColorSpace* colorSpace() const { return fColorSpace.get(); } On 2016/05/31 ...
4 years, 6 months ago (2016-05-31 14:52:06 UTC) #40
reed1
4 years, 6 months ago (2016-05-31 22:07:00 UTC) #41
Message was sent while issue was closed.
https://codereview.chromium.org/2000713003/diff/220001/include/core/SkImageIn...
File include/core/SkImageInfo.h (right):

https://codereview.chromium.org/2000713003/diff/220001/include/core/SkImageIn...
include/core/SkImageInfo.h:244: SkColorSpace* colorSpace() const { return
fColorSpace.get(); }
On 2016/05/31 14:52:06, scroggo wrote:
> On 2016/05/31 14:30:08, msarett wrote:
> > On 2016/05/31 13:48:25, scroggo wrote:
> > > Now that SkColorSpace is in include/, can this return a const ref to
sk_sp?
> > > 
> > 
> > Yeah I think it could.  The reason I went with a bare ptr was so the client
> > doesn't necessarily have to ref the color space.  I think the const ref to
> sk_sp
> > would accomplish the same thing.  I'm not sure which is better (or what is
> "Skia
> > style"). 
> 
> I don't think Skia style has been updated, but my read of
>
https://docs.google.com/document/d/1PZRnDBwhnB_Ug6DtlkphAvJ9Ga5U3ONbSn1wf6jXX-8
> tells me that a getter should return a const ref.
> 
> > Whatever we decide here, we should do the same thing in SkCodec.h.
> 
> +1
> 
> > 
> > > From Herb's comment [1], it looks like the goal was to not include
> > > SkColorSpace.h, but we still include it?
> > > 
> > > [1]
> > >
> >
>
https://codereview.chromium.org/2000713003/diff/20001/include/core/SkImageInf...
> > 
> > I'll look if we might be able to get away with a forward declare...
> > 
> > My read of Herb's comment was a suggestion to expose information about the
> gamma
> > rather than the entire SkColorSpace object.  I ultimately decided against
this
> > approach for a few reasons:
> > (1) I was wrapping APIs that are already on SkColorSpace.
> > (2) What should we return when the SkColorSpace is nullptr?
> > (3) The SkColorSpace API is already limited.  Is there a reason to limit it
> > further?
> > (4) We can expose this object without forcing the client to ref it.
> 
> sgtm
> 

That doc needs updating. We have (so far at least) decided to not change what
our getters return, so I think bare-pointer is correct.

Powered by Google App Engine
This is Rietveld 408576698