Add an option to create unpremultiplied bitmaps.
Currently they cannot be used directly by Skia, but
the pixels can be used elsewhere.
SkImageDecoder:
Add functions to require unpremultiplied output
and query the presence of the requirement
SkImageDecoder_libpng:
SkImageDecoder_libwebp:
SkImageDecoder_WIC:
Respect the requirement for unpremultiplied output.
TODO: Fix SkImageDecoder_CG.
SkScaledBitmapSampler:
Add procs to skip premultiplication and a boolean
parameter to use those procs.
ImageDecodingTest:
Test unpremultiplied bitmap decoding.
SampleUnpremul:
Add a sample which allows visually comparing between the
unpremultiplied version (copied into a premultiplied bitmap,
since drawing unpremultiplied is not currently supported)
and a premultiplied version of image files.
gm.h:
Add a getter for the resource path, so Samples can use it.
As of patch set 13, https://codereview.chromium.org/16816016/
and https://codereview.chromium.org/16983004/, which were
approved separately.
R=reed@google.com
Review URL: https://codereview.chromium.org/16410009
git-svn-id: http://skia.googlecode.com/svn/trunk@9612 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gyp/SampleApp.gyp b/gyp/SampleApp.gyp
index 8b64cbd..644121f 100644
--- a/gyp/SampleApp.gyp
+++ b/gyp/SampleApp.gyp
@@ -109,6 +109,7 @@
'../samplecode/SampleTiling.cpp',
'../samplecode/SampleTinyBitmap.cpp',
'../samplecode/SampleUnitMapper.cpp',
+ '../samplecode/SampleUnpremul.cpp',
'../samplecode/SampleVertices.cpp',
'../samplecode/SampleXfermodesBlur.cpp',
'../samplecode/TransitionView.cpp',
diff --git a/gyp/bench.gypi b/gyp/bench.gypi
index c7f0c11..2be3f22 100644
--- a/gyp/bench.gypi
+++ b/gyp/bench.gypi
@@ -28,6 +28,7 @@
'../bench/GameBench.cpp',
'../bench/GradientBench.cpp',
'../bench/GrMemoryPoolBench.cpp',
+ '../bench/ImageDecodeBench.cpp',
'../bench/InterpBench.cpp',
'../bench/LineBench.cpp',
'../bench/LightingBench.cpp',
diff --git a/gyp/tests.gyp b/gyp/tests.gyp
index 557fea5..3bdf18d 100644
--- a/gyp/tests.gyp
+++ b/gyp/tests.gyp
@@ -66,6 +66,7 @@
'../tests/GrMemoryPoolTest.cpp',
'../tests/GrSurfaceTest.cpp',
'../tests/HashCacheTest.cpp',
+ '../tests/ImageDecodingTest.cpp',
'../tests/InfRectTest.cpp',
'../tests/LListTest.cpp',
'../tests/LayerDrawLooperTest.cpp',