History log of /external/skia/src/codec/SkSwizzler.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e16b04aa6041efb6507546547737e9603fa1606e 15-Apr-2015 msarett <msarett@google.com> SkJpegCodec

Enables basic decoding for jpegs

Includes rewinding

565, YUV, and Jpeg encoding are not yet implemented

BUG=skia:3257

Review URL: https://codereview.chromium.org/1076923002
/external/skia/src/codec/SkSwizzler.cpp
3c309db75bb8c4c2b58724a0e2f6f3b387ca842c 10-Apr-2015 msarett <msarett@google.com> Implementing filling for SkBmpCodec

The bmp codec currently returns kIncompleteInput
when the stream is truncated, which we treat as a
partial success. However, we neglect the fill the
remaining pixels in the image, leaving these
uninitialized.

This CL addresses this problem by initializing the
remaining pixels in the image to default values.

BUG=skia:3257

Review URL: https://codereview.chromium.org/1075243003
/external/skia/src/codec/SkSwizzler.cpp
438b2adefb9e9213e0ddaf0609405d3087a1cf0a 09-Apr-2015 msarett <msarett@google.com> ***Disables swizzles to 565.
We may want to enable swizzles to 565
for images that are encoded in a format
similar to 565, however, we do not want
to take images that decode naturally to
kN32 and then convert them to 565.

***Enable swizzles to kIndex_8. For images
encoded in a color table format, we suggest
that they be decoded to kIndex_8. When we
decode, we only allow conversion to kIndex_8
if it matches the suggested color type (except
wbmp which seems good as is).

***Modify dm to test images that decode to
kIndex_8.

BUG=skia:3257
BUG=skia:3440

Review URL: https://codereview.chromium.org/1055743003
/external/skia/src/codec/SkSwizzler.cpp
05245900bf6d49068b1668da1b38890a41e09bc5 25-Mar-2015 scroggo <scroggo@google.com> Add scanline decoding to SkCodec.

Add an interface for decoding scanlines, and implement that interface
in the PNG decoder.

Use a separate method to determine whether an image that used a type
with alpha was actually opaque.

SkScanlineDecoder.h:
New interface for decoding scanlines.

SkCodec.h:
Add getScanlineDecoder.
Add a virtual function (with non-virtual caller) for determining
whether the image truly had alpha. The client can call this to
determine if the image was actually opaque if it reported having alpha.
Remove code to sneakily change the passed in alpha type.

SkCodec_libpng.*:
Split up code onGetPixels into helper functions that can be shared with
the scanline decoder.
Implement scanline decoding.
Implement onReallyHasAlpha.

SkSwizzler.*:
Add a new SrcConfig as a default, which is invalid.
Add a function for setting fDstRow directly.
Assert fDstRow is not NULL.

BUG=skia:3257

Review URL: https://codereview.chromium.org/1010903003
/external/skia/src/codec/SkSwizzler.cpp
eed039b5ffbdff958053ac80b09451ad6caa1787 18-Mar-2015 msarett <msarett@google.com> Adding swizzles for bmp:
We now support kN32 and kRGB_565 color types.
Additionally, we support premul, unpremul, and opaque alpha types.
Unpremul is currently untested as we cannot currently draw to unpremul.

BUG=skia:

Review URL: https://codereview.chromium.org/1013743003
/external/skia/src/codec/SkSwizzler.cpp
9552662e9fee5eb0ef435e52ab9db505d7ebe4ad 17-Mar-2015 scroggo <scroggo@google.com> Option for SkCodec to treat dst as all zeroes.

This recreates SkImageDecoder's feature to skip writing zeroes for
SkCodec.

Review URL: https://codereview.chromium.org/980903002
/external/skia/src/codec/SkSwizzler.cpp
741143878b23d22cd9cb7b9cba8055179115ce17 16-Mar-2015 msarett <msarett@google.com> Revert "Revert of fix for invalid for loop syntax broke build (patchset #1 id:1 of https://codereview.chromium.org/1007373003/)"

This reverts commit d18475854ce232de71c5463e0654f459d4abfd43.

Revert "Revert "Implementation of image decoding for bmp files, in accordance with the new API.""

This reverts commit dfdec78a5d02e8690998741a9fe5b71a08ca3232.

BUG=skia:

TBR=

Review URL: https://codereview.chromium.org/1016443003
/external/skia/src/codec/SkSwizzler.cpp
dfdec78a5d02e8690998741a9fe5b71a08ca3232 16-Mar-2015 msarett <msarett@google.com> Revert "Implementation of image decoding for bmp files, in accordance with the new API."

This reverts commit 3675874468de7228944ce21922e6ec863f5f2310.

BUG=skia:
NOTREECHECKS=true
NOTRY=true
TBR=

Review URL: https://codereview.chromium.org/1012873002
/external/skia/src/codec/SkSwizzler.cpp
3675874468de7228944ce21922e6ec863f5f2310 16-Mar-2015 msarett <msarett@google.com> Implementation of image decoding for bmp files, in accordance with the new API.

Currently decodes to opaque and unpremul.

Tested on local test suite.

BUG=skia:3257

Review URL: https://codereview.chromium.org/947283002
/external/skia/src/codec/SkSwizzler.cpp
f24f2247c25b842327e12c70e44efe4cc1b28dfa 03-Mar-2015 scroggo <scroggo@google.com> Add SkCodec, including PNG implementation.

DM:
Add a flag to use SkCodec instead of SkImageDecoder.

SkCodec:
Base class for codecs, allowing creation from an SkStream or an SkData.
An SkCodec, on creation, knows properties of the data like its width and height. Further calls can be used to generate the image.
TODO: Add scanline iterator

SkPngCodec:
New decoder for png. Wraps libpng. The code has been repurposed from SkImageDecoder_libpng.
TODO: Handle other destination colortypes
TODO: Substitute the transpose color
TODO: Allow silencing warnings
TODO: Use RGB instead of filler?
TODO: sRGB

SkSwizzler:
Simplified version of SkScaledSampler. Unlike the sampler, this object does no sampling.
TODO: Implement other swizzles.

Requires a gclient sync to pull down libpng.

BUG=skia:3257

Committed: https://skia.googlesource.com/skia/+/ca358852b4fed656d11107b2aaf28318a4518b49
(and then reverted)

Review URL: https://codereview.chromium.org/930283002
/external/skia/src/codec/SkSwizzler.cpp
ee1a726aed980016a9371ffa4768e0844c360eb2 02-Mar-2015 scroggo <scroggo@google.com> Revert of Add SkCodec, including PNG implementation. (patchset #24 id:460001 of https://codereview.chromium.org/930283002/)

Reason for revert:
Breaking windows bots all over the place :(

Original issue's description:
> Add SkCodec, including PNG implementation.
>
> DM:
> Add a flag to use SkCodec instead of SkImageDecoder.
>
> SkCodec:
> Base class for codecs, allowing creation from an SkStream or an SkData.
> An SkCodec, on creation, knows properties of the data like its width and height. Further calls can be used to generate the image.
> TODO: Add scanline iterator
>
> SkPngCodec:
> New decoder for png. Wraps libpng. The code has been repurposed from SkImageDecoder_libpng.
> TODO: Handle other destination colortypes
> TODO: Substitute the transpose color
> TODO: Allow silencing warnings
> TODO: Use RGB instead of filler?
> TODO: sRGB
>
> SkSwizzler:
> Simplified version of SkScaledSampler. Unlike the sampler, this object does no sampling.
> TODO: Implement other swizzles.
>
> BUG=skia:3257
>
> Committed: https://skia.googlesource.com/skia/+/ca358852b4fed656d11107b2aaf28318a4518b49

TBR=reed@google.com,djsollen@google.com,msarett@google.com,mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:3257

Review URL: https://codereview.chromium.org/972743003
/external/skia/src/codec/SkSwizzler.cpp
ca358852b4fed656d11107b2aaf28318a4518b49 02-Mar-2015 scroggo <scroggo@google.com> Add SkCodec, including PNG implementation.

DM:
Add a flag to use SkCodec instead of SkImageDecoder.

SkCodec:
Base class for codecs, allowing creation from an SkStream or an SkData.
An SkCodec, on creation, knows properties of the data like its width and height. Further calls can be used to generate the image.
TODO: Add scanline iterator

SkPngCodec:
New decoder for png. Wraps libpng. The code has been repurposed from SkImageDecoder_libpng.
TODO: Handle other destination colortypes
TODO: Substitute the transpose color
TODO: Allow silencing warnings
TODO: Use RGB instead of filler?
TODO: sRGB

SkSwizzler:
Simplified version of SkScaledSampler. Unlike the sampler, this object does no sampling.
TODO: Implement other swizzles.

BUG=skia:3257

Review URL: https://codereview.chromium.org/930283002
/external/skia/src/codec/SkSwizzler.cpp