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

Issue 2177193004: Always supply a color space (sRGB for now) with F16 (Closed)

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

Description

Always supply a color space (sRGB for now) with F16 BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2177193004 Committed: https://skia.googlesource.com/skia/+/efded51cd8122c1360717161d3455f2a48a37bc0

Patch Set 1 #

Patch Set 2 : Fix uploading of F16 textures with color spaces #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -8 lines) Patch
M bench/nanobench.cpp View 1 chunk +1 line, -1 line 0 comments Download
M dm/DM.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M samplecode/SampleApp.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/SkGr.cpp View 1 1 chunk +5 lines, -2 lines 0 comments Download
M tests/TestConfigParsing.cpp View 1 chunk +1 line, -1 line 0 comments Download
M tools/flags/SkCommonFlagsConfig.cpp View 1 chunk +1 line, -1 line 0 comments Download
M tools/skiaserve/Request.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 22 (13 generated)
Brian Osman
As discussed: In preparation for using the color space as the only signal for gamma-correction ...
4 years, 5 months ago (2016-07-25 20:04:45 UTC) #5
mtklein
> This introduces a handful of changes across GMs and SKPs, but I think they're ...
4 years, 5 months ago (2016-07-25 20:45:36 UTC) #8
mtklein
On 2016/07/25 20:45:36, mtklein wrote: > > This introduces a handful of changes across GMs ...
4 years, 5 months ago (2016-07-25 21:26:48 UTC) #9
mtklein
On 2016/07/25 21:26:48, mtklein wrote: > On 2016/07/25 20:45:36, mtklein wrote: > > > This ...
4 years, 5 months ago (2016-07-26 01:26:07 UTC) #10
Brian Osman
On 2016/07/26 01:26:07, mtklein wrote: > On 2016/07/25 21:26:48, mtklein wrote: > > On 2016/07/25 ...
4 years, 4 months ago (2016-07-26 13:43:31 UTC) #11
Brian Osman
On 2016/07/26 13:43:31, Brian Osman wrote: > On 2016/07/26 01:26:07, mtklein wrote: > > On ...
4 years, 4 months ago (2016-07-26 15:09:34 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2177193004/20001
4 years, 4 months ago (2016-07-26 15:10:55 UTC) #19
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://skia.googlesource.com/skia/+/efded51cd8122c1360717161d3455f2a48a37bc0
4 years, 4 months ago (2016-07-26 15:11:53 UTC) #21
mtklein
4 years, 4 months ago (2016-07-26 15:11:55 UTC) #22
Message was sent while issue was closed.
On 2016/07/26 15:09:34, Brian Osman wrote:
> On 2016/07/26 13:43:31, Brian Osman wrote:
> > On 2016/07/26 01:26:07, mtklein wrote:
> > > On 2016/07/25 21:26:48, mtklein wrote:
> > > > On 2016/07/25 20:45:36, mtklein wrote:
> > > > > > This introduces a handful of changes across GMs and SKPs, but I
think
> > > > they're
> > > > > > all expected. Many raster F16 gms that involve text get "more
correct"
> > > > (which
> > > > > > was also going to happen based on mtklein's upcoming
> > F16-via-new-pipeline
> > > > > > change).
> > > > > I thought this would be true, but it turns out it's not.
> > > > > 
> > > > > I'm still puzzled by why these changes happen.
> > > > > 
> > > > > I agree f16 looks right after this and not before, but I don't
> understand
> > > why.
> > > > 
> > > > Provided that there's not too much diff after
> > > > https://codereview.chromium.org/2184443002/, this lgtm.
> > > > 
> > > > If there's something we don't understand, I want to try to understand
why
> it
> > > was
> > > > broken before landing.
> > > 
> > > I see... 3 diffs, all of which go from having f16 draw wrong to drawing
> > exactly
> > > like sRGB.  Two of the three look like explicit surface allocation
> shenanigans
> > > in the GM... what's the deal with the change to savelayer_with_backdrop? 
> > > Something we got wrong there with the layer?
> > 
> > Not sure. On my laptop, testing all configs (raster, gpu) x (legacy, srgb,
> f16),
> > I'm seeing 15 images that are actually different (and 1 with different
bits).
> > But like you - all of them make sense except for the
savelayer_with_backdrop.
> > Going to poke at that one a bit...
> 
> Okay. I think I've found where things went wrong before (maybe). During the
> filter,
> we try to snap the source image to a raster-backed SkSpecialImage. That calls
> SkSpecialImage::MakrFromRaster, which then tries to copy to an N32 temp:
> 
>    if (!bm.copyTo(&tmpStorage, kN32_SkColorType)) { ... }
> 
> SkBitmap::copyTo then constructs the info for the destination using this
logic:
> 
>    const SkImageInfo dstInfo = srcPM.info().makeColorType(dstColorType);
> 
> At this point, srcPM is still the F16 source, and in the old code, has no
> color space attached, so we end up with a legacy N32 temporary bitmap. I think
> that leads us to pick a blitter for one of the early intermediate copies that
> doesn't understand F16, leading to a completely empty filtered result.
> 
> In the new world (color space attached to F16), dstInfo ends up being sRGB,
> so we go down the new world path, with blitters that know how to read F16...
> 
> Ultimately, all of this is just a small piece of the "image filters don't
> understand F16 or operate at high precision" problem, but I think we can land
> this, anyway.

SGTM

Powered by Google App Engine
This is Rietveld 408576698