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>
skia: Add workaround for gcc 4.8 bug #54781

Change-Id: Ie201f6b1965c945ba9a14a69722dbb498516bec8
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
SkBitmap: Fix race condition under multi-thread environment.

++fPixelLockCount and --fPixelLockCount in lockPixels() and unlockPixels()
is not thread safe. Some race codidions may happened that lead to black
screen in some games.

Change-Id: I22f70467d5fcc8675ef400e5066302c89ff11162
Author: Liang Wang <liangx.wang@intel.com>
Signed-off-by: Liang Wang <liangx.wang@intel.com>
Signed-off-by: Yihua Jin <yihua.jin@intel.com>
Signed-off-by: Bing Deng <bingx.deng@intel.com>
Signed-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: 37550
Modify skjpeg_destination_mgr to make it work with both optimized and orignial Libjpeg's SW JPEG encoders

Issue:
"dest->free_in_buffer" is always 0 when sk_empty_output_buffer is called in
orignial Libjpeg's SW JPEG encoder, but it tends not to 0 when
sk_empty_output_buffer is called after optimization, for we probably need to
flush encoded data before the buffer is 100% full. This is required for some
3rd party libraries such as Intel-IPP.

Solution:
Change the size to be copies from "skjpeg_destination_mgr::kBufferSize" to
"skjpeg_destination_mgr::kBufferSize - dest->free_in_buffer".

Change-Id: If74a8f77e2bd371eee5ee7488fccf349b713d9ac
Author: Jing Sun <jing.a.sun@intel.com>
Signed-off-by: Jing Sun <jing.a.sun@intel.com>
Signed-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: 51639
Skia: GPU backend enhancement for canvas2D.

and force it to be on LUL

Improve browser performance for canvas2D, we adopted skia-gpu backend.
Add a switch to turn on GR_STATIC_RECT_VB flag, which improve the performance.

Change-Id: Ia9468dae210c27b1d5549787b39c432a6693d178
Author: Kangyuan Shu <kangyuan.shu@intel.com>
Signed-off-by: Yijun Zhu <yijunx.zhu@intel.com>
Signed-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: 26567
[MTBF]Tombstone on com.android.browser at /system/lib/libskia.so

if given a null bitmap to encode, the function will be failed, now we check
the given picture.

Change-Id: Iea12db55165817e64339135e60a1afca6dec0979
Author: Weiwei Ji <weiweix.ji@intel.com>
Signed-off-by: Weiwei Ji <weiweix.ji@intel.com>
Signed-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: 38891
Add a definition used in SkPaint.cpp to differentiate between different memcpy_76es

Change-Id: I2555f513f5cd8c72496eb5b58d558987ec8b85a3
Who has two thumbs and big ol' nuts?

this guy

Change-Id: I009ec9534688d54cb72d565b3c58c4378dabb5a8