[Skia]: fix TOMBSTONE issue when browsing JPEG image and exiting Gallery

When browsing JPEG image and then exiting Gallery, the TOMBSTONE issue
occour. This is because JPEG Decode method still access a pointer which has been deleted.
This patch can fix it.

Change-Id: I3ac3e4b8f37d352a70676abb6d151961e873e459
Author: Zhongjun Chen <zhongjunx.chen@intel.com>
Signed-off-by: Zhongjun Chen <zhongjunx.chen@intel.com>
Singed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 37479
Assembly optimized 4 blittering related functions:

S32A_D565_Opaque
S32A_Opaque_BlitRow32
nofilter_gether
S32A_Blend_BlitRow32

* S32A_D565_Opaque:

Use neon instructions to optimize BLIT routine which operates on
32-bit source ARGB pixel and 16-bit destination RGB pixel. Here,
we process 16-pixels in an iteration. We use regular (32-bit)
arm instructions when number of pixels is less than 16 or the
architecture doesn't support SIMD/NEON instructions. When alpha
value is 255, this version of BLIT routine performs 35% better
in comparison to S32A_D565_Opaque_neon routine.

* S32A_Opaque_BlitRow32 and nofilter_gether:

Use neon instructions to optimize BlitRow32 and nofilter_gether
functions for 32-bit source and destination pixel arrays. An improvement
of 76% is observed with neon optimized BlitRow32 function and 6%
improvement is observed with nofilter_gether function.

* S32A_Blend_BlitRow32:

Optimize S32A_Blend_BlitRow32 using neon instructions for armv7
based targets and using regular arm instructions for armv6 based
targets.

This is the consolidated commit from several patches.

Change-Id: Id5aab49656247b9a69b43cfb22fe7a8608f847e5
Apply PLD to blittering functions

Extend software pipelining for S32A_Blending to process 16 points
perloop and per-read points of next loop

Change-Id: Ib7a6a6efb8249b96578e75613683099251dc2a82
Two skia optimizations:

1. Combine S16_opaque_D32_nofilter_DX and clampx_nofilter_trans
2. Change MAX_BUF between mproc and sproc to 1024 from 128

Opt 1 is giving about 8-10 FPS in gmail and facebook apk.
Opt 2 is helping all combinations for shaderspan.

Change-Id: I88dc097ffd52984a7b786e13c70384688f2e1b12
File changes for SKIA Neon optimziation for S32_Opaque_filter_DX

Change-Id: I0e8a0506aca2a8d4ee4f4b6b1aa4dcc9ce9c0329
Fix CTS failure.

Revert opt 2 in the following commit.

Author: Xin Qi <xqi@codeaurora.org>
Date:   Wed Nov 16 10:07:54 2011 -0800

    Two skia optimizations:

    1. Combine S16_opaque_D32_nofilter_DX and clampx_nofilter_trans
    2. Change MAX_BUF between mproc and sproc to 1024 from 128

    Opt 1 is giving about 8-10 FPS in gmail and facebook apk.
    Opt 2 is helping all combinations for shaderspan.

CRs-Fixed: 330807

Change-Id: Iece797781e97918f4c77fc767bf9e6772927d6f3
skia: Fix a bug in clampx_nofilter_trans_S16_D32_DX

When scaling a line, in the case of the last pixel needing to be
duplicated, the beginning of the line is getting clobbered with wrong
value.  This is because dest buffer pointer is not moved forward.  Fix
that by adding pointer update line.

CRs-Fixed: 349571

Change-Id: Id6dc41d7e6bd2b777097f62e788bd2476609a9ae
skia: Don't reduce optimization level to -O2

Don't reduce optimization level to -O2: It's sufficient to disable function inlining

Change-Id: I8510a4ed4f21c143dba185fe9f080347781c99da
Fix access to freed memory

Source should be freed after all jpeg operations completed
since it is used by these operations.

Change-Id: Ieb0741e1d219dc0513133a94d47df86b5f95cf29
Merge "Fix access to freed memory"
Enable dynamic effect of GIF animating images in browser

The ANDROID_LARGE_MEMORY_DEVICE flag is not set for x86 platforms but it
is required to get animated GIF working. 256MB is considered "large".

Change-Id: I2ed6d1668702e6b422e6d585eb8cd06f064ccc32
Author: Bin Xu <bxu10X@intel.com>
Signed-off-by: Bin Xu <bxu10X@intel.com>
Singed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 19205
Merge "Enable dynamic effect of GIF animating images in browser"
Merge "[Skia]: fix TOMBSTONE issue when browsing JPEG image and exiting Gallery"
Merge remote branch 'remotes/aosp/master' into merge_branch

Conflicts:
	Android.mk

Change-Id: Id7a24082798821f40e22a649a53fe5fc27635bfb