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

Issue 2349373004: Create special surfaces according to original device (not always in N32) (Closed)

Created:
4 years, 3 months ago by Brian Osman
Modified:
4 years, 3 months ago
CC:
reviews_skia.org
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Change SkSpecialImage::makeSurface and makeTightSurface to take output properties (color space), bounds, and (optional) alphaType. We were being pretty inconsistent before. Raster was honoring all components of the info. GPU was using the supplied color type, but propagating the source's color space. All call sites were saying N32. What we want to do is propagate the original device's color space, and pick a good format from that. Rather than force all the clients to jump through hoops constructing an SkImageInfo that meets our criteria, just have them supply the few bits we care about, and do everything else internally. This also lets us always use RGBA on GPU, but N32 on raster. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2349373004 Committed: https://skia.googlesource.com/skia/+/53c38087949252d27cde668368a3eeb59cc2eb00 Committed: https://skia.googlesource.com/skia/+/eed6b0e1d865a1f93143c09961debba0aca592ca

Patch Set 1 #

Total comments: 1

Patch Set 2 : Add OutputProperties to makeSurface #

Patch Set 3 : Fix makeTightSurface, too #

Patch Set 4 : Fixes for displacment, raster, etc... #

Patch Set 5 : Paint fixes #

Patch Set 6 : Rebase #

Patch Set 7 : Rebase #

Patch Set 8 : Remove include, upstream #

Total comments: 4

Patch Set 9 : Remove copy-pasted default parameter, expand comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -70 lines) Patch
M src/core/SkImageFilter.cpp View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M src/core/SkMatrixImageFilter.cpp View 1 1 chunk +1 line, -3 lines 0 comments Download
M src/core/SkSpecialImage.h View 1 2 2 chunks +8 lines, -3 lines 0 comments Download
M src/core/SkSpecialImage.cpp View 1 2 3 4 5 6 7 8 6 chunks +50 lines, -15 lines 0 comments Download
M src/effects/SkColorFilterImageFilter.cpp View 1 1 chunk +1 line, -2 lines 0 comments Download
M src/effects/SkDisplacementMapEffect.cpp View 1 2 3 4 5 6 7 8 1 chunk +12 lines, -1 line 0 comments Download
M src/effects/SkDropShadowImageFilter.cpp View 1 1 chunk +1 line, -3 lines 0 comments Download
M src/effects/SkImageSource.cpp View 1 1 chunk +1 line, -5 lines 0 comments Download
M src/effects/SkMergeImageFilter.cpp View 1 1 chunk +1 line, -4 lines 0 comments Download
M src/effects/SkOffsetImageFilter.cpp View 1 1 chunk +1 line, -3 lines 0 comments Download
M src/effects/SkPaintImageFilter.cpp View 1 1 chunk +1 line, -4 lines 0 comments Download
M src/effects/SkPictureImageFilter.cpp View 1 2 chunks +3 lines, -6 lines 0 comments Download
M src/effects/SkTileImageFilter.cpp View 1 2 3 chunks +3 lines, -9 lines 0 comments Download
M src/effects/SkXfermodeImageFilter.cpp View 1 2 3 4 5 1 chunk +1 line, -3 lines 0 comments Download
M tests/SpecialImageTest.cpp View 1 2 2 chunks +5 lines, -6 lines 0 comments Download

Messages

Total messages: 24 (13 generated)
Brian Osman
I think I need to make a similar change to makeTightSurface?
4 years, 3 months ago (2016-09-20 21:33:45 UTC) #5
bsalomon
https://codereview.chromium.org/2349373004/diff/1/src/core/SkSpecialImage.h File src/core/SkSpecialImage.h (right): https://codereview.chromium.org/2349373004/diff/1/src/core/SkSpecialImage.h#newcode89 src/core/SkSpecialImage.h:89: sk_sp<SkSpecialSurface> makeSurface(const SkIRect& size, SkISize?
4 years, 3 months ago (2016-09-21 13:30:55 UTC) #8
robertphillips
lgtm % Brian's comment
4 years, 3 months ago (2016-09-21 13:58:09 UTC) #9
Brian Osman
Much better version of this change, based on our discussion. Includes a hack so that ...
4 years, 3 months ago (2016-09-23 13:44:08 UTC) #11
bsalomon
lgtm
4 years, 3 months ago (2016-09-23 13:54:59 UTC) #12
robertphillips
https://codereview.chromium.org/2349373004/diff/140001/src/core/SkImageFilter.cpp File src/core/SkImageFilter.cpp (right): https://codereview.chromium.org/2349373004/diff/140001/src/core/SkImageFilter.cpp#newcode350 src/core/SkImageFilter.cpp:350: int newWidth, int newHeight, int offX, int offY) { ...
4 years, 3 months ago (2016-09-23 14:11:29 UTC) #13
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/2349373004/160001
4 years, 3 months ago (2016-09-23 14:34:02 UTC) #16
commit-bot: I haz the power
Committed patchset #9 (id:160001) as https://skia.googlesource.com/skia/+/53c38087949252d27cde668368a3eeb59cc2eb00
4 years, 3 months ago (2016-09-23 15:11:57 UTC) #18
Brian Osman
A revert of this CL (patchset #9 id:160001) has been created in https://codereview.chromium.org/2366723004/ by brianosman@google.com. ...
4 years, 3 months ago (2016-09-23 15:49:30 UTC) #19
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/2349373004/160001
4 years, 3 months ago (2016-09-23 20:02:50 UTC) #22
commit-bot: I haz the power
4 years, 3 months ago (2016-09-23 20:04:08 UTC) #24
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://skia.googlesource.com/skia/+/eed6b0e1d865a1f93143c09961debba0aca592ca

Powered by Google App Engine
This is Rietveld 408576698