Support for HW JPEG Decoder in SKIA

Add support to use HW JPEG Decoder in SKIA
through dynamic loading of vendor specific
library. Vendor library to provide APIs to
check if HW decode is possible for a stream
and if so decode the stream. Methods
allocPixelRef and getPrefConfig in
SkImageDecoder made public because vendor
lib has access only to the SkImageDecoder
and not its derived class.

Change-Id: Ie6e9366603a3a3923d7f041d7601589dadf75ac8
Add optimization of Skia S32A_Opaque blitter

Adds optimization of Skia S32A_Opaque_BlitRow32 blitter using ARM NEON
instruction set. Special cases for when alpha is zero or opaque.
Improves performance platform wide.

Change-Id: I0ffeb23b128e61cfe581ad121f227631d2918686
Signed-off-by: Henrik Smiding <henrik.smiding@stericsson.com>
Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
Add optimization of Skia S32A_Blend blitter

Adds optimization of Skia S32A_Blend_BlitRow32 blitter using ARM NEON
instruction set. Special cases for when pixel alpha is zero.
Improves performance platform wide.

Change-Id: I6c8bf8a9525838682206ebd139855354d6b3a563
Signed-off-by: Henrik Smiding <henrik.smiding@stericsson.com>
Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
Add optimized S32A_D565_Opaque_Dither blitter.

Adds optimization of Skia S32A_D565_Opaque_Dither blitter using
ARM NEON instruction set.
Improves performance in browser.
Change-Id: Ie20fb3cf3ad9a60f01b79e3ed2ddba7651bcf013
Signed-off-by: Henrik Smiding <henrik.smiding@stericsson.com>
Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
Modify sample buffer size for larger displays

BZ: 146848

Increases the intermediate buffer size for sample pixel indexes,
used in the sample proc function calls. If the operation is bigger
than the buffer it's split into multiple calls, creating overhead.
This would especially impact the performance of SIMD optimizations.

Change-Id: I44d0723cb26372050741e28fc14f676ddcd56d77
Category: aosp improvement
Domain: AOSP-Others
Origin: internal
Upstream-Candidate: yes
Signed-off-by: Henrik Smiding <henrik.smiding@intel.com>
Reviewed-on: https://android.intel.com/163478
Tested-by: sys_abtbuild <sys_abtbuild@intel.com>
Reviewed-by: Landberg, Joakim <joakim.landberg@intel.com>
Reviewed-by: Chen, HuaqiangX <huaqiangx.chen@intel.com>
Reviewed-by: Fagerstedt, Axel <axel.fagerstedt@intel.com>
NEON optimized blitter S32_Opaque_D32_filter_DX

Re-work for latest code base as the -Os compiler options is added.
Overwrite the optimization level at function level.

Change-Id: I732fea7f02f775a4b06884460dea2887d4108820
SkDraw::drawRect optimization

New class in SkDeviceLooper.cpp falls in in the critical code path of
SkDraw::drawRect().  This new class SkDeviceLooper does nothing except
for bound checking. It copies the modified rect bounds into new pointer
variables and returns them back "if needed". The additional overhead of
creating an object of SkDeviceLooper class and calling member functions
reduces performance.  This patch creates a pre-check condition and if
it succeeds we know for sure SkDeviceLooper won't change the rect
bounds. Under this condition, we avoid using the SkDeviceLooper class.

Change-Id: I11fa13ace8d50d52069e1780a14874e4c34133f2
Add shader for Clamp_S32_Opaque_D32_filter_DX.

Adds a NEON optimized shader for S32_Opaque_D32_filter_DX when
running with clamped tile mode.
Improves performance of browser and many other applications.

Change-Id: Ic3d83bfd70c8b0c6c956482db5f3a08667655d6e
Signed-off-by: Henrik Smiding <henrik.smiding@stericsson.com>
Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
Add shader for Repeat_SI8_opaque_D32_filter_DX.

Adds a NEON optimized shader for SI8_opaque_D32_filter_DX when
running with repeat tile mode.
Improves performance of browser.

Change-Id: Ic5cc63b3df86eb7e8ea0bbb3b7bddfc73db20025
Signed-off-by: Henrik Smiding <henrik.smiding@stericsson.com>
Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
Add shader for Clamp_S32_Opaque_D32_nofilter_DX.

Adds an optimized shader for S32_Opaque_D32_nofilter_DX when
running with clamped tile mode.
Improves performance of system and various applications.

Change-Id: I8dd7be24870315b2b8273bf72d9c22eb0aeb97fb
Signed-off-by: Henrik Smiding <henrik.smiding@stericsson.com>
Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
Add optimized S16_opaque_D32_nofilter_DX blitter.

Adds an NEON optimized version of Skia sample blitter
S16_opaque_D32_nofilter_DX when running unscaled.
Used when scrolling UI lists.

Change-Id: I7a212f2e50aba3244aab237937395af02abe81a9
Signed-off-by: Henrik Smiding <henrik.smiding@stericsson.com>
Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
Merge branch 'cm-12.0' of git://github.com/CyanogenMod/android_external_skia into cm-12.0