skia2/resources
Leon Scroggins III 81886e8f94 Switch SkCodec to use skcms
Bug: skia:6839
Bug: skia:8052

Create an skcms_Profile instead of an SkColorSpace when creating an
SkCodec. Eventually we'll move the SkImageInfo (and its SkColorSpace)
entirely to clients (e.g. SkAndroidCodec, SkCodecImageGenerator), but
for now, create it with SkEncodedInfo::makeImageInfo.

Create new SkEncodedInfo::Colors for the special PNG cases that we
want to map to specific SkColorTypes.

SkEncodedInfo:
- Add ICCProfile, which owns an skcms_ICCProfile
 - FIXME: maybe we should have a single instance for
  SRGB like SkColorSpace?
- Add kXAlpha_Color, for kAlpha_8. Since I'm not longer creating
  an SkImageInfo (at least in SkPngCodec), it needs a way to pass
  this info to the caller.
- Add k565_Color, for the same reason. Matt originally had this in
  https://codereview.chromium.org/2212563003/#ps120001, but didn't
  land that version. I like it though. Mike didn't like the bits
  per component for 565, but it seems like a sensible hack, much
  like the existing one for kAlpha_8
- Add width and height. These were removed for redundancy with
  SkImageInfo, but it makes sense to have them here without it.
BUILD.gn:
- Build the new SkEncodedInfo.cpp
SkCodec:
- Remove the constructor with an SkImageInfo. Edit the other one
  to drop width and height (now in SkEncodedInfo) and take a RHS
  reference to SkEncodedInfo
- Create the SkImageInfo from fEncodedInfo (for now)
- Consolidate choosing skcms_AlphaFormat for Transform here
- Call conversionSupported from initializeColorXform, with a new
  parameter for whether there is a color Xform, allowing SkJpegCodec
  and SkHeifCodec to override that method instead of having another
  method.
SkBmpCodec (etc)
- Adapt to the changes above
- Create a new SkEncodedInfo w/o profile for the swizzler.
SkPngCodec:
- use the new SkEncodedInfo::Colors rather than a custom SkImageInfo
SkRawCodec:
- Remove SkEncodedInfo from SkDngImage, which doesn't actually need it.
  This is helpful since we don't know all the info yet.
- Rewrite gAdobeRGB_toXYZD50 as an skcms_Matrix3x3
SkWebpCodec:
- Remove premul_step computation, and simplify to just rely on
  the base class' handling of applying the transform.
SkSwizzler:
- Add cases for the new SkEncodedInfo::Colors

TBR=reed@google.com
No public API changes. Only private/public members of SkCodec.h are
modified.

Change-Id: Ic0d3bb752b03f13be886b80331987aa5a5713fc0
Reviewed-on: https://skia-review.googlesource.com/136062
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-08-22 18:16:20 +00:00
..
android_fonts Move lang to list in Android font manager. 2017-08-14 19:29:05 +00:00
empty_images Do not create an SkRawCodec with zero dimensions 2016-12-02 22:23:35 +00:00
fonts Add color fonts. 2018-03-28 20:14:44 +00:00
icc_profiles update ColorSpaceTest.cpp to remove MakeICC 2018-05-23 17:11:11 +00:00
images Switch SkCodec to use skcms 2018-08-22 18:16:20 +00:00
invalid_images Update piex and add test image 2018-02-22 21:32:48 +00:00
lua Update SampleLua and lua files. 2018-05-22 15:51:25 +00:00
nima skeletal animation support added to API and software backend 2018-06-29 19:34:28 +00:00
skotty [skottie] Nested animation support 2018-02-23 19:15:26 +00:00
Cowboy.svg Add animated cowboy sample from WebKit tests, and fix. 2017-09-25 21:14:09 +00:00
crbug769134.fil Avoid uninitialized memory in readByteArrayAsData 2017-09-28 19:51:32 +00:00
nov-talk-sequence.txt demo tweaks, scale up perlin, add call to flush for fps 2015-11-09 13:10:30 -08:00
pdf_command_stream.txt SkPDF/Bench: add bench for SkPDFSharedStream (deflate) 2016-02-24 15:17:20 -08:00
README Add animated cowboy sample from WebKit tests, and fix. 2017-09-25 21:14:09 +00:00

The resources directory includes some third party content used by Skia.
Licenses for that code are included in this file.

Openclipart

Openclipart uses the Creative Commons Zero 1.0 Public Domain License every time
an artist uploads a piece of clipart to Openclipart to make it clear the artist
is releasing the creative work for anyone to use for any reason, even
commercially. This act of "sharing" is the foundation Openclipart is based upon.
More details on the license can be found at
https://creativecommons.org/publicdomain/zero/1.0/.

LGPL or compatible (as implied by inclusion in KDE SVN)
http://websvn.kde.org/trunk/tests/ksvgtests/custom/cowboy.svg