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

Issue 2250663002: Add alphaType() to SkImage (Closed)

Created:
4 years, 4 months ago by Brian Osman
Modified:
4 years, 4 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@special-image-alpha-type
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Add alphaType() to SkImage Keep isOpaque as a convenience method -- many places really only need to know that for optimization purposes (SrcOver -> Src, etc...). In all the places where we pull data back out or convert to another object and need to supply an SkImageInfo, we can avoid losing information about premulness. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2250663002 Committed: https://skia.googlesource.com/skia/+/69c166d2ce3f4d2099f35f8e88f1aa56ceeaf960

Patch Set 1 #

Total comments: 4

Patch Set 2 : Test unpremul raster surface snapping #

Total comments: 1

Patch Set 3 : Rebase #

Patch Set 4 : Rebase #

Patch Set 5 : Remove virtuals from SkImage, slight cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -48 lines) Patch
M gm/image.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M include/core/SkImage.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M src/image/SkImage.cpp View 1 2 3 4 2 chunks +5 lines, -1 line 0 comments Download
M src/image/SkImage_Base.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/image/SkImage_Generator.cpp View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M src/image/SkImage_Gpu.h View 1 2 3 4 2 chunks +1 line, -1 line 0 comments Download
M src/image/SkImage_Gpu.cpp View 1 2 3 5 chunks +6 lines, -14 lines 0 comments Download
M src/image/SkImage_Raster.cpp View 1 2 3 4 3 chunks +3 lines, -5 lines 0 comments Download
M src/pdf/SkPDFBitmap.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M tests/ImageTest.cpp View 5 chunks +9 lines, -10 lines 0 comments Download
M tests/SurfaceTest.cpp View 1 1 chunk +9 lines, -10 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 22 (13 generated)
Brian Osman
Do we want to do this? I don't think it's necessary, but Brian's comments about ...
4 years, 4 months ago (2016-08-16 15:35:29 UTC) #5
robertphillips
https://codereview.chromium.org/2250663002/diff/1/tests/SurfaceTest.cpp File tests/SurfaceTest.cpp (right): https://codereview.chromium.org/2250663002/diff/1/tests/SurfaceTest.cpp#newcode142 tests/SurfaceTest.cpp:142: for (auto& surface_func : { &create_surface, &create_direct_surface }) { ...
4 years, 4 months ago (2016-08-16 16:23:20 UTC) #8
Brian Osman
https://codereview.chromium.org/2250663002/diff/1/tests/SurfaceTest.cpp File tests/SurfaceTest.cpp (right): https://codereview.chromium.org/2250663002/diff/1/tests/SurfaceTest.cpp#newcode142 tests/SurfaceTest.cpp:142: for (auto& surface_func : { &create_surface, &create_direct_surface }) { ...
4 years, 4 months ago (2016-08-16 17:24:23 UTC) #9
reed1
Still a little nervous describing this publicly, tho I don't have very clear reasons. What ...
4 years, 4 months ago (2016-08-16 19:22:12 UTC) #11
Brian Osman
On 2016/08/16 19:22:12, reed1 wrote: > Still a little nervous describing this publicly, tho I ...
4 years, 4 months ago (2016-08-16 19:52:47 UTC) #12
Brian Osman
PTAL - No more virtuals in SkImage, and I shuffled things around to keep onImageInfo ...
4 years, 4 months ago (2016-08-17 18:33:23 UTC) #15
reed1
lgtm
4 years, 4 months ago (2016-08-17 19:06:09 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/2250663002/80001
4 years, 4 months ago (2016-08-17 20:54:28 UTC) #20
commit-bot: I haz the power
4 years, 4 months ago (2016-08-17 21:01:10 UTC) #22
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://skia.googlesource.com/skia/+/69c166d2ce3f4d2099f35f8e88f1aa56ceeaf960

Powered by Google App Engine
This is Rietveld 408576698