Modify sample buffer size for larger displays.

Modifies the intermediate buffer size for sample pixel indexes, used in the
sample proc function calls. If the buffer is not large enough, the job is split
into several calls. This would impact the performance of SIMD optimizations.

Change-Id: I86848d1c44fe338258b40f6ee6a576289cebd496
Signed-off-by: Henrik Smiding <henrik.smiding@stericsson.com>
Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
Add memcpy optimization pass for Skia samplers.

Adds an optimization to skia samplers that is using memcpy to copy the
pixels when the source and destination is the same size, unscaled, and
unfiltered.

Change-Id: I014db353e880cf09f3f0b17bbe7bcd2cc2d43d80
Signed-off-by: Henrik Smiding <henrik.smiding@stericsson.com>
Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
Skia: Fix path to OpenGL Headers

PS2: make it depending on nothing
This patch will change the path to point to the correct location
of the OpenGL Headers. The path has changed to
frameworks/native/opengl/include/.

Change-Id: Ib85e3d9e6df530f12605306eb0bad7c7b5799dfe

Conflicts:
	Android.mk

Change-Id: I2f93727e023cfa009a1bb83f72185325da252bb0
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>
Remove deprecated register

In c++11, register has been deprecated, and
all of skia is now built as gnu++11

From the documentation:
A register specifier is a hint to the implementation
that the variable so declared will be heavily used.
[ Note: The hint can be ignored and in most implementations
it will be ignored if the address of the variable is taken.
This use is deprecated (see D.2) ]

Change-Id: Ic7432b034037fea273c4a9c09f0ca4a728f7eb88
Signed-off-by: DHOMD <DHO@dho.im>
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
skia: NEON blit optimizations from Samsung

 * Improves performance across the board

Change-Id: I3aa66f69140acf3992fbeb6346de4444195fdf92

Conflicts:
	src/core/SkBlitter_RGB16.cpp
Skia: Add NEON intrinsic D32_A8_Black and D32_A8_Opaque

If NEON support is indiciated via __ARM_HAVE_NEON flag then use
an optimized NEON intrinsics version of the D32_A8_Black and D32_A8_Opaque
masking function.

Change-Id: I20d2bf15515d960b73e635784a0daf29302e1f12
skia: Fix Codenomicon image open failure.

Add code to handle 'No image descriptor' case in a gif image format.
Remove goto call.

CRs-Fixed: 333162

(cherrypicked from commit I80d7df9d5f112b5fe32699ce6dd2df0f48323bb1)

Change-Id: I44ff4e0ab681febdb5304b9761a92e6717d4ee2a
SkLanguage and SkPaintOptionsAndroid optimization

(1) Global linked list to manage SkLanguage and SkPaintOptionsAndroid
    objects
(2) All copy constructor overheads associated with above classes are
    changed to simple pointer assignment
(3) All string related operations in SkLanguage class are replaced with
    simple pointer manipulation. Also saving on string allocations.
(4) SkLangList and SkPaintOptionsAndroidList are 2 new classes created
    to manage the global linked list
(5) SkLanguages and SkPaintOptionsAndroids are 2 new singleton classes
    created to work with the global linked list class (See 4)

Change-Id: Id1d8357569e79f7e3da403b56a08db937afb07eb
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
external/skia Hooks for optimized blitting

Add in hooks to allow for overriding blitting operations with
optimized functions.

Change-Id: If38010a69d9fe7cf412d91c277db666f2fd7df34
Hide warnings for skia

Can be handled upstream if needed.

Change-Id: I25d4ab459b1158c3f7f0f8129561cf9495b60fca
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

Conflicts:
	Android.mk
Skia: Fix special case in D32_A8_Opaque and _Black

Neon optimization implemented for D32_A8_Opaque and D32_A8_Black
is not using the right mask for width>=2 and width<4 case. This
is fixed in this patch by handling 4 different cases: width >=8,
4<=width<7, 2<=width<4, and residual case.

Change-Id: I20bf1cc28eac08402d4133aac663ebfc393edbe0
-03
Fix derp
Add missing destructors to avoid memory leaks

This patch fixes a memory leak, which is caused
by the lack of destructors for FontFamily and FontFileInfo.

Change-Id: Ib1f796ca0846c474649ad400cdf31b806a33dd72
Build skia test program in arm mode

The skia library is built in non-thumb mode, but several optimisations
are disabled if the test program is built in thumb mode.
The ARM version of SkFloatToFixed is not as accurate as the portable
version... presumably that is ok.

Signed-off-by: Chris Dearman <chris@mips.com>

Change-Id: Ie19c3d60b0b5a77171433962aa3e8851e5ac6ae5
skia: Optimize SkBlurMask

There is code that checks profile_size and sw/sh inside loops.
However profile_size and sw/sh do not change in loop execution.
Codes for checking them should be placed outside of loop.

This patch makes the code 40% faster than the the original in
blurrect_direct_* tests in skia_bench.

Use skia_bench to verify:
skia_bench --repeat 3 --config 8888 --match ^blurrect_direct

Change-Id: Iff939333ade25ebf73f459cdcbe4c22733ec9cec