Build fixes from linaro.

skia: Use -fno-strict-aliasing for tests

Tests aren't compatible with strict aliasing rules, and aren't
speed relevant anyway -- use -fno-strict-aliasing

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

skia: Fix build in ISO C++11 mode

Fix macro constructs that could be mistaken for new string literals

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

skia: Use -fno-strict-aliasing for now

Change-Id: Iced75d8e419ffeee26e478b7716dfcf13e0f53d0
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

skia/bench: Use -fno-strict-aliasing

Use -fno-strict-aliasing for the benchmark so we don't have to use
it globally

Change-Id: Ibe5b80587818058cbb4290fe694c0b5d4cdc75a0
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

skia: Fix build in ISO C++ 11 mode

Change-Id: Ic1241cca1ec6eced270bff62da45e6c6b49e3ef2
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Support NEON anti-aliasing blit function in SKIA

original function has calculation are called repetitively, and
Processed individual pixels only. So Function call overhead was reduced.
And In contrast to the serial data processing in the existing code,
the Neon code processes 8 or 4 pixels in parallel. In contrast to the
serial data processing in the existing code, the Neon code processes
8 or 4 pixels in parallel

Change-Id: Ib54aeb6bacfd4ed6d257324e8146b211f90b68e9
Signed-off-by: Lee Hwangjae <hj-yo.lee@samsung.com>
memcpy_76(): fix behavior on non-ARM architectures

The destination is passed as the first argument to memcpy_76() and the
source is passed as the second argument.  As originally written in
commit cb5701e, the first argument was called 'src' (despite being the
destination) and the second was called 'dst' (despite being the
source).  The behavior of the memcpy_76() function was correct despite
the backward variable naming.

Commit ad673c1 reversed the naming of the two arguments to clarify the
semantics of the function but failed to reverse the naming in the ARM
assembly code.  This broke the function's behavior on ARM devices.

Commits a8ce1a0 and f4be52e reversed the argument names again.  This
fixed ARM support, but broke non-ARM architectures (the arguments to
memcpy() in the body of the memcpy_76() function were not also
reversed).

This change swaps the argument names again and swaps the names in the
ARM assembly, restoring correct behavior on non-ARM architectures and
aligning the variable names with the function's semantics.

Change-Id: Iaeb2b84b6696e3eebf29617dfdc41c55e5226776

Conflicts:

	src/core/SkPaint.cpp
skia: SkPaint::SkPaint(): don't cast away const

This will help avoid bugs like the one fixed in change-id:
Iaeb2b84b6696e3eebf29617dfdc41c55e5226776.

Change-Id: I892423e18f9927f827393d0ff0c923259e07389c

Conflicts:

	src/core/SkPaint.cpp
Skia: Introduce caching of unscaled Bitmaps.

This allows skia to choose whether to use the prescaled bitmap or the
unscaled bitmap depending on which would be optimal in the current
situation. This commit also introduces two functions necessary for
properly resizing Rects when using the non-pre-scaled bitmaps.

CRs-fixed: 451681

Change-Id: I36779d8a680a3ced7c28da492e879de02c7e87a5
Neon optimized implementation of S16_opaque_D32_nofilter_DX

This patch does the following:
* Neon ASM blitter from RGB565 to ABGR8888 without blend.
* Special case for no scaling but the scaling case is almost as fast.

 Copyright (C) ST-Ericsson SA 2010

Change-Id: I0fae80b14aa5a5c7f6ff4c251bc1419ffa0d4751
Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
skia: compile SkTextBox for Samsung's libtvout

Change-Id: Ic1fdddbe8c5c41ff2bf7c1b723d054e509a64185
Skia: Fix path to OpenGL Headers

The path that Skia was pointing to for the OpenGL Headers
was moved to frameworks/native. This patch will also be
submitted to the mainline for Google.

Change-Id: I75d2ce267d5ec202bb2e5e995f25f9ddfba0dc57
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
Revert "memcpy_76(): add support for non-ARM architectures"

This reverts commit ad673c1cb9dd151fd4e74380c4ba82c1fefb580b.
FIX: memcpy_76(): add support for non-ARM architectures

Before, memcpy_76() assumed ARM instruction set.  Add preprocessor
guards to use generic memcpy() if not on ARM.

Original patch had args to memcpy_76 backwards.

Change-Id: Ib5375e9de28ab6c2b348731dcdf282d6f7a529c1
memcpy_76(): fix behavior on non-ARM architectures

The destination is passed as the first argument to memcpy_76() and the
source is passed as the second argument.  As originally written in
commit cb5701e, the first argument was called 'src' (despite being the
destination) and the second was called 'dst' (despite being the
source).  The behavior of the memcpy_76() function was correct despite
the backward variable naming.

Commit ad673c1 reversed the naming of the two arguments to clarify the
semantics of the function but failed to reverse the naming in the ARM
assembly code.  This broke the function's behavior on ARM devices.

Commits a8ce1a0 and f4be52e reversed the argument names again.  This
fixed ARM support, but broke non-ARM architectures (the arguments to
memcpy() in the body of the memcpy_76() function were not also
reversed).

This change swaps the argument names again and swaps the names in the
ARM assembly, restoring correct behavior on non-ARM architectures and
aligning the variable names with the function's semantics.

Change-Id: Iaeb2b84b6696e3eebf29617dfdc41c55e5226776
Implementing Color32 functions for Neon platforms.

Besides the raw processing improvement provided by Neon, the code uses memory
preteches (pld) which seem to improve performance greatly when dealing with
very large counts.

This was tested using bench where color32 accounts for the majority of the
workload:
bench -match rects_1 -config 8888 -repeat 500 -forceBlend 1
(the forceBlend is there so that the Color32 code does not go through the
special cases where alpha == 0xFF as it would transform color32 into
a sk_memset32.

Numbers averaged over 3 runs:
bench name      | Before | Neon, no pld | Neon with pld | full boost
rrects_1        | 153.9  | 128.3        | 92            | 1.66x
rects_1_stroke_4| 32.8   | 31.4         | 28.45         | 1.15x
rects_1         | 125.35 | 97.2         | 63.59         | 1.97x

Credits: various googletv team members.

Committed on behalf of evannier.
Review URL: http://codereview.appspot.com/5569077/

git-svn-id: http://skia.googlecode.com/svn/trunk@4779 2bbb7eff-a529-9590-31e7-b0007b416f81
Landing arm patch from contributor.

http://codereview.appspot.com/5649055

git-svn-id: http://skia.googlecode.com/svn/trunk@3541 2bbb7eff-a529-9590-31e7-b0007b416f81
Revert "Neon optimized implementation of S16_opaque_D32_nofilter_DX"

This reverts commit a9a4c66d163e245628ddde71dca40e4c29a44f47.
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 Clamp_SI8_opaque_D32_filter_DX.

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

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