Ensure that the stream passed to JPEG for subset decoding is
neither deleted before it is no longer needed nor deleted an
extra time.
src/images/SkJpegUtility.h:
src/images/SkJpegUtility.cpp:
Always ref and unref the stream provided to skjpeg_source_mgr.
Add some comments explaining how skjpeg_source_mgr's members
handle ownership.
Fix a warning comparing signed and unsigned numbers, converting
to size_t which is more appropriate for measuring bytes.
Remove dead code referring to fMemoryBase and fMemoryBaseSize,
which are never used.
src/images/SkImageDecoder_libjpeg.cpp:
Call the new constructor for skjpeg_source_mgr, which no longer
takes a boolean to determine ownership.
include/images/SkBitmapRegionDecoder.h
src/images/SkBitmapRegionDecoder.cpp:
This small shim has been removed, since it is not needed to use
Skia's image decoders. Its functionality will be folded into
Android.
Required for the merge to Android.
R=djsollen@google.com
Review URL: https://codereview.chromium.org/21561002
git-svn-id: http://skia.googlecode.com/svn/trunk@10483 2bbb7eff-a529-9590-31e7-b0007b416f81
$ compare-android.sh bench --match bitmap_ --repeat 30
master -> ssse3
N=30 p=0.001000 (corrected to 0.000033)
sig? speedup bench
n -1.16% bitmap_scale_filter_256_64
y -0.72% bitmap_8888_A_scale_bicubic
y -0.21% bitmap_index8_A
n -0.00% bitmap_565
n -0.00% bitmap_scale_filter_90_80
n 0.03% bitmap_8888_A_source_transparent
y 0.06% bitmap_index8
y 0.30% bitmap_8888_A_source_stripes_two
n 0.34% bitmap_scale_filter_80_90
y 0.42% bitmap_8888_A
y 0.44% bitmap_8888_A_source_opaque
n 0.53% bitmap_scale_filter_90_10
y 0.71% bitmap_8888_A_source_stripes_three
y 0.91% bitmap_8888_A_scale_rotate_bicubic
y 1.04% bitmap_8888_update
n 1.19% bitmap_scale_filter_10_90
n 1.39% bitmap_scale_filter_90_90
y 1.77% bitmap_8888_update_volatile
y 1.89% bitmap_8888
y 2.37% bitmap_scale_filter_30_90
y 9.57% bitmap_scale_filter_64_256
n 17.86% bitmap_scale_filter_90_30
y 25.40% bitmap_8888_A_scale_rotate_bilerp
y 27.19% bitmap_8888_scale_rotate_bilerp
y 27.23% bitmap_8888_update_scale_rotate_bilerp
y 27.29% bitmap_8888_update_volatile_scale_rotate_bilerp
y 55.08% bitmap_8888_A_scale_bilerp
y 58.75% bitmap_8888_update_volatile_scale_bilerp
y 58.90% bitmap_8888_scale_bilerp
y 58.92% bitmap_8888_update_scale_bilerp
Overall speedup: 10.52%
BUG=skia:1111
R=djsollen@google.com
Review URL: https://codereview.chromium.org/21203005
git-svn-id: http://skia.googlecode.com/svn/trunk@10474 2bbb7eff-a529-9590-31e7-b0007b416f81
In order to preserve the immutability of SkImageFilters, the crop rect is passed as a constructor parameter. If NULL (the default), the bounds of the input image are used, as before.
This also tightens up the boundary handling for SkImageBlurFilter on the GPU backend. Where we were previously using clamping semantics, we now respect decal semantics (so we don't oversaturate the edges). This brings the GPU and raster backends into closer alignment, but will require some new baselines for the GPU tests.
At a minimum, the following tests will need new baselines: imageblur, imagefiltersbase, imagefilterscropped, spritebitmap.
R=reed@google.com
Committed: https://code.google.com/p/skia/source/detail?r=10251
Review URL: https://codereview.chromium.org/19775006
git-svn-id: http://skia.googlecode.com/svn/trunk@10338 2bbb7eff-a529-9590-31e7-b0007b416f81
In order to preserve the immutability of SkImageFilters, the crop rect is passed as a constructor parameter. If NULL (the default), the bounds of the input image are used, as before.
This also tightens up the boundary handling for SkImageBlurFilter on the GPU backend. Where we were previously using clamping semantics, we now respect decal semantics (so we don't oversaturate the edges). This brings the GPU and raster backends into closer alignment, but will require some new baselines for the GPU tests.
At a minimum, the following tests will need new baselines: imageblur, imagefiltersbase, imagefilterscropped, spritebitmap.
R=reed@google.com
Review URL: https://codereview.chromium.org/19775006
git-svn-id: http://skia.googlecode.com/svn/trunk@10251 2bbb7eff-a529-9590-31e7-b0007b416f81
This is a step toward targets declaring their deps in a sane fashion.
This change resolves cycles by forcing core to the root, then everything
in skia_lib pointing toward core as best possible, then everything
outside skia_lib depending on skia_lib for things in skia_lib. This
prevents double definitions where a symbol is provided by both the
skia_lib shared object and and a statically linked component of skia_lib.
R=djsollen@google.com
Review URL: https://codereview.chromium.org/19823003
git-svn-id: http://skia.googlecode.com/svn/trunk@10231 2bbb7eff-a529-9590-31e7-b0007b416f81
Need to avoid linking in .a things which are already provided by .so things.
git-svn-id: http://skia.googlecode.com/svn/trunk@10222 2bbb7eff-a529-9590-31e7-b0007b416f81
This is a step toward targets declaring their deps in a sane fashion.
This change resolves cycles by forcing core to the root,
then opts, ports, and utils depending on core, then everything else.
We will need some other change to resolve the fact that
core, opts, ports, and utils depend on each other and other targets which
depend on them. Outside of these targets, things look ok.
R=djsollen@google.com
Review URL: https://codereview.chromium.org/19823003
git-svn-id: http://skia.googlecode.com/svn/trunk@10217 2bbb7eff-a529-9590-31e7-b0007b416f81