[MIPS] Mips DSP optimizations

Change-Id: I6318430d8dc116ac5667595d87c8329eb4fdead4
[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
remove SSE check at runtime if it's supported at compile-time

SSE2 is a hardware feature supported by atom-based platform.
So it's unnecessary to do runtime check. This will get 2%-3%
benefit for some SKIA-intensive workloads.

Change-Id: I48fa905b503a7060a647cd38ab55ce7e179ee926
Author: Lei Li <lei.l.li@intel.com>
Signed-off-by: Lei Li <lei.l.li@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: 20472
turn on SK_CPU_HAS_CONDITIONAL_INSTR for x86 platform

This is turned off by default. X86 CPU has conditional jump instructions. Thus
turn on it to get generally %5 improvement for 2D workloads

Change-Id: Ie62f5b1c93ac21abb6f7f2c98ca01498a3352f7f
Author: Lei Li <lei.l.li@intel.com>
Signed-off-by: Lei Li <lei.l.li@intel.com>
Signed-off-by: bxu10X <bxu10X@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: 20471
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