DescriptionIndex8 GPU and CPU raster support.
Code developed to support Chromium GIF (animation and single frame) Index8
decoding: https://codereview.chromium.org/1460523002/
GPU:
Following handling of YUV planes: palette and indices are in two textures and
GrIndex8toRGBEffect is used to render to RGBA target texture, used further in
Ganesh.
CPU:
Only thing needed there was a change in SkImageGenerator::tryGenerateBitmap:
Chromium image generator declares Index8 colorType, but in rare cases (never
with the first frame, only with some of the frames after) decoder can produce
only N32.
Caveats:
At the moment, there is conversion to N32 before rendering in case
where drawBitmapRect has clipping scalling. Plan is to provide measurements
showing that there is improvement in this case, too and optionally improve.
Using RGBA target texture as existing code is doing the same, good to check
if N32 (so, BGRA for cases where N32 == BGRA) is better.
BUG=chromium:476531, chromium:138421
Patch Set 1 #
Total comments: 2
Patch Set 2 : generate index8, n32 replaced by onGetColorType #
Total comments: 2
Patch Set 3 : revert SkImageGenerator&SkImageCacherator changes. #
Messages
Total messages: 15 (3 generated)
|