[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

Conflicts:
	src/opts/opts_check_SSE2.cpp
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
Added check for wrong stream/buffer allocation

Description of changes: Fix prevents possible access to wrong stream
(if length=0 buffer will be NULL) during ico image decoding.

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

Conflicts:
	include/core/SkPreConfig.h
tweaks for forward compatibility

Change-Id: Id9089424d82567556fc1faf6024cfe46b3de7cfe