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

Issue 2088303002: Add GrColor4f type, store that in GrPaint. Linearize based on global flag. (Closed)

Created:
4 years, 6 months ago by Brian Osman
Modified:
4 years, 6 months ago
Reviewers:
herb_g, 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

GrColor4f is yet another 4f color type, unfortunately. - Sk4f would be my choice, but it's not allowed in include/ - SkColor4f and SkPM4f are specified to be unpremultiplied/premultiplied, whereas GrColor (and GrColor4f) are either, depending on context. This adds 12 bytes to GrPaint. Not sure if we want to pay that price. The precision loss for a single value (vs. in a gradient, etc...) may not justify changing the storage type here. Easy enough to back that part out, while still keeping the 4f intermediate type for the helper math that it adds, and for storage and parameter passing in other locations. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2088303002 Committed: https://skia.googlesource.com/skia/+/a4535a34d1b317543307df6901debfefe7132569

Patch Set 1 #

Patch Set 2 : Linearize paint color, always set as 4f #

Total comments: 1

Patch Set 3 : Remove global flag - SkColor is sRGB in gamma-correct mode! #

Patch Set 4 : Rebase #

Patch Set 5 : Fix conversion to SkColor4f with new channel order #

Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -11 lines) Patch
M include/gpu/GrColor.h View 1 2 3 4 1 chunk +48 lines, -0 lines 0 comments Download
M include/gpu/GrPaint.h View 1 2 chunks +8 lines, -3 lines 0 comments Download
M src/gpu/GrPaint.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/SkGr.cpp View 1 2 8 chunks +22 lines, -6 lines 0 comments Download

Messages

Total messages: 19 (10 generated)
Brian Osman
First (tiny) steps toward handling non-image sources in Ganesh.
4 years, 6 months ago (2016-06-23 15:09:19 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2088303002/20001
4 years, 6 months ago (2016-06-23 15:09:52 UTC) #6
bsalomon
https://codereview.chromium.org/2088303002/diff/20001/src/gpu/SkGr.cpp File src/gpu/SkGr.cpp (right): https://codereview.chromium.org/2088303002/diff/20001/src/gpu/SkGr.cpp#newcode537 src/gpu/SkGr.cpp:537: extern bool gTreatSkColorAsSRGB; What's this?
4 years, 6 months ago (2016-06-23 15:20:30 UTC) #7
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-23 15:27:03 UTC) #9
Brian Osman
On 2016/06/23 15:20:30, bsalomon wrote: > https://codereview.chromium.org/2088303002/diff/20001/src/gpu/SkGr.cpp > File src/gpu/SkGr.cpp (right): > > https://codereview.chromium.org/2088303002/diff/20001/src/gpu/SkGr.cpp#newcode537 > ...
4 years, 6 months ago (2016-06-23 15:51:08 UTC) #10
bsalomon
On 2016/06/23 15:51:08, Brian Osman wrote: > On 2016/06/23 15:20:30, bsalomon wrote: > > https://codereview.chromium.org/2088303002/diff/20001/src/gpu/SkGr.cpp ...
4 years, 6 months ago (2016-06-24 13:54:48 UTC) #11
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/2088303002/80001
4 years, 6 months ago (2016-06-24 19:33:14 UTC) #14
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/2088303002/80001
4 years, 6 months ago (2016-06-24 19:34:54 UTC) #17
commit-bot: I haz the power
4 years, 6 months ago (2016-06-24 19:50:22 UTC) #19
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://skia.googlesource.com/skia/+/a4535a34d1b317543307df6901debfefe7132569

Powered by Google App Engine
This is Rietveld 408576698