skia2/include
halcanary@google.com 3d50ea1b87 Add Options to SkDecodingImageGenerator, simplify API.
Motivation: We want to remove redundant classes from Skia.  To
that end we want to remove SkImageRef and its subclasses and
replace their uses with SkDiscardablePixelRef +
SkDecodingImageGenerator.  Since Android uses SkImageRef, we need
to make sure that SkDecodingImageGenerator allows all of the
settings that Android exposes in BitmapFactory.Options.

To that end, we have created an Options struct for the
SkDecodingImageGenerator which lets the client of the generator set
sample size, dithering, and bitmap config.

We have made the SkDecodingImageGenerator constructor private
and replaced the SkDecodingImageGenerator::Install functions
with a SkDecodingImageGenerator::Create functions (one for
SkData and one for SkStream) which now take a
SkDecodingImageGenerator::Options struct.

Also added a ImageDecoderOptions test which loops through a list
of sets of options and tries them on a set of 5 small encoded
images.

Also updated several users of SkDecodingImageGenerator::Install to
follow new call signature - gm/factory.cpp, LazyDecodeBitmap.cpp,
and PictureTest.cpp, CachedDecodingPixelRefTest.cpp.

We also added a new ImprovedBitmapFactory Test which simulates the
exact function that Android will need to modify to use this,
installPixelRef() in BitmapFactory.

R=reed@google.com, scroggo@google.com

Committed: https://code.google.com/p/skia/source/detail?r=12744

Review URL: https://codereview.chromium.org/93703004

git-svn-id: http://skia.googlecode.com/svn/trunk@12855 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-02 13:15:13 +00:00
..
animator Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
config Revert "Revert "begin to remove SkLONGLONG and wean Skia off of Sk64"" 2013-12-20 14:24:21 +00:00
core Add Options to SkDecodingImageGenerator, simplify API. 2014-01-02 13:15:13 +00:00
device/xps Override drawRRect in fake SkBitmapDevices. 2013-11-12 17:10:02 +00:00
effects Remove SkBitmapAlphaThresholdShader 2013-12-18 21:58:53 +00:00
gpu Updated GLintptr and GLsizeiptr to be the appropriate types on 64 bit Windows (Take 2) 2013-12-19 19:37:10 +00:00
images Update all callsites to use info for pixelrefs 2013-12-13 19:45:58 +00:00
pathops Export SkPathOps.h functions for external use. 2013-07-09 19:43:35 +00:00
pdf Revert "[PDF] Fix font embedding restrictions." 2013-12-10 17:22:41 +00:00
pipe Fixes for piping bitmaps with encoded data. 2013-04-30 02:32:41 +00:00
ports Android now uses Harfbuzz-NG. No need to keep code specific to the old version of Harfbuzz around! 2013-12-18 19:49:27 +00:00
svg Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
text Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
utils Sanitizing source files in Housekeeper-Nightly 2013-12-31 07:01:36 +00:00
views Support MSAA4 and (non-ES) OpenGL in Android SampleApp 2013-12-10 20:37:41 +00:00
xml Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00