Add writeToMemory() API to SkColorSpace
authormsarett <msarett@google.com>
Thu, 28 Jul 2016 17:47:50 +0000 (10:47 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 28 Jul 2016 17:47:50 +0000 (10:47 -0700)
commita0605bf9d13f5758a6fa2fa366c4dc5341c2cf61
treeb97a154e5fc108baf33ee71baa3ee8c7ec20fdbf
parent0634317cbe50f5dd21e7e78da59cb2dba0edcae4
Add writeToMemory() API to SkColorSpace

New API mirrors the form of similar APIs in SkRegion,
SkMatrix, etc.

This also fixes a bug:
SkImageInfo appears in a object that Chrome stores in
discardable memory. So when sk_sp<SkColorSpace> was added
to SkImageInfo a leak was introduced. We'll use this new
method and deserialize to store the SkColorSpace in the
discardable object.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2192903002

Review-Url: https://codereview.chromium.org/2192903002
include/core/SkColorSpace.h
src/core/SkColorSpace.cpp
tests/ColorSpaceTest.cpp