Merge tag 'android-4.4.1_r1' into HEAD

Android 4.4.1 Release 1
Revert "Skia: Add NEON intrinsic D32_A8_Black and D32_A8_Opaque"

This reverts commit 5563cd440ba280a2ba0fc0edbcb790d3d1e2a947.
Revert "Revert "Skia: Add NEON intrinsic D32_A8_Black and D32_A8_Opaque""

This reverts commit b81d6f4d3d203fef9a0fc4162a5a8c8a5c2b347c.

Change-Id: I0bc946911312d6d2c0481f57eae74e2ea3ea16a0
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
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
Skia: bug fix for SkBitmapProcState_shaderproc.h

Take care of "dx" being 0 case

Change-Id: Ie492c0454d6c8876ea9bb48e911de77cc78a8e98
New Theme Engine [3/6]

SUMMARY
This commit will allow fonts to be changed in SKIA at runtime for android. We provide
a new method "ClearCache()" in SkTypeface. Calling this method will clear any typeface
caches in the library and reload default fonts.

Furthermore when android is loading /system/etc/system_fonts.xml there is now
parsing of /data/theme/theme_fonts.xml (if it exists). Clearing the cache
will cause these xml files to be reloaded. By modifying the theme_fonts.xml
and clearing the cache one can change fonts at runtime. Skia clients
simply need to create the font again.

BACKGROUND
SkFontConfigInterface_android.cpp provides android specific implementations
for font resolution. It does this by providing a SkFontConfigInterface singleton.
When the singleton is created it parses /system/etc/system_fonts.xml which provides a mapping
between the font name and the ttf file. There is also a vendor and fallback xml parsed.

Example:
 <family>
        <nameset>
            <name>sans-serif</name>
            <name>arial</name>
            <name>helvetica</name>
            <name>tahoma</name>
            <name>verdana</name>
        </nameset>
        <fileset>
            <file>Roboto-Regular.ttf</file>
            <file>Roboto-Bold.ttf</file>
            <file>Roboto-Italic.ttf</file>
            <file>Roboto-BoldItalic.ttf</file>
        </fileset>
    </family>

So in order to change the font mapping we clear this singleton. When the singleton
is requested again it will reload the xml file. Our change will now also load a xml in
the data partition so that new fonts can be downloaded and configured.

Clearing the singleton however is not enough. There are additional layers between the singleton and
the calling client that cache typefaces. So we needed to modify these files and clear caches from top down.

APENDIX A: CREATING A TYPEFACE OVERVIEW
Client
  |
SkTypeFace::CreateFromName
  |
SkFontHost::CreateTypeFace
  |
FontConfigTypeface::LegacyCreateTypeface //Will check SkTypefaceCache in this method call
  |
SkFontConfigInterface::matchFamilyName()
  |
SkFontConfigInterfaceAndroid::matchFamilyName //Android impl, uses info from parsed xml to resolve name

CONTRIBUTORS
Andrew Mast <andy@cyngn.com>
Clark Scheff <clark@cyngn.com>

Change-Id: I3972adebe76438b710cfc8241f35efd71e90811f
Revert "New Theme Engine [3/6]"

This reverts commit c2807ac91187a30afe0e3e5755e2eabfdc9b9d1b.
Merge tag 'android-4.4.3_r1.1' into HEAD

Android 4.4.3 release 1.1

Signed-off-by: scott <scott@ubuntu>

Conflicts:
	src/core/SkBitmap.cpp

Change-Id: Ic2dde939a779472cd116fc3cad4f7b08852057bb

Conflicts:
	Android.mk
	include/core/SkShader.h
	src/images/SkImageDecoder_libgif.cpp
TEMPORARY: Disable qc-perf

It needs to be updated for the new skia

Change-Id: I419f8238657541fb6640ef46192f534dbf3670ba
Revert "TEMPORARY: Disable qc-perf"

This reverts commit 15fbbbe16cd59422a5ca62a683c5b64df1761695.
Revert "Merge tag 'android-4.4.3_r1.1' into HEAD"

This reverts commit 9fcf3a7532582ab4273d3ebbef065da37a1225c4.
Merge tag 'android-4.4.3_r1' into HEAD

Android 4.4.3 release 1

Signed-off-by: scott <scott@ubuntu>

Conflicts:
	Android.mk
	include/core/SkShader.h
	include/ports/SkFontConfigInterface.h
	src/core/SkBitmap.cpp
	src/core/SkTypeface.cpp
	src/core/SkTypefaceCache.h
	src/images/SkImageDecoder_libgif.cpp

Change-Id: I5bc5a94027922fbb096b7c43f4a56842674208e3

Conflicts:
	include/ports/SkFontConfigInterface.h
	src/core/SkTypeface.cpp
	src/core/SkTypefaceCache.h
Revert "Revert "TEMPORARY: Disable qc-perf""

This reverts commit 81a6b8754a101f60f91241e3ce9eb76bc7b613ef.
fixes... forgot to push this...  sorry guys!

Change-Id: I33afcd0e00022d1d82c4758d5f15779b29599204
Signed-off-by: scott <scott@ubuntu>
New Theme Engine [3/6]

SUMMARY
This commit will allow fonts to be changed in SKIA at runtime for android. We provide
a new method "ClearCache()" in SkTypeface. Calling this method will clear any typeface
caches in the library and reload default fonts.

Furthermore when android is loading /system/etc/system_fonts.xml there is now
parsing of /data/theme/theme_fonts.xml (if it exists). Clearing the cache
will cause these xml files to be reloaded. By modifying the theme_fonts.xml
and clearing the cache one can change fonts at runtime. Skia clients
simply need to create the font again.

BACKGROUND
SkFontConfigInterface_android.cpp provides android specific implementations
for font resolution. It does this by providing a SkFontConfigInterface singleton.
When the singleton is created it parses /system/etc/system_fonts.xml which provides a mapping
between the font name and the ttf file. There is also a vendor and fallback xml parsed.

Example:
 <family>
        <nameset>
            <name>sans-serif</name>
            <name>arial</name>
            <name>helvetica</name>
            <name>tahoma</name>
            <name>verdana</name>
        </nameset>
        <fileset>
            <file>Roboto-Regular.ttf</file>
            <file>Roboto-Bold.ttf</file>
            <file>Roboto-Italic.ttf</file>
            <file>Roboto-BoldItalic.ttf</file>
        </fileset>
    </family>

So in order to change the font mapping we clear this singleton. When the singleton
is requested again it will reload the xml file. Our change will now also load a xml in
the data partition so that new fonts can be downloaded and configured.

Clearing the singleton however is not enough. There are additional layers between the singleton and
the calling client that cache typefaces. So we needed to modify these files and clear caches from top down.

APENDIX A: CREATING A TYPEFACE OVERVIEW
Client
  |
SkTypeFace::CreateFromName
  |
SkFontHost::CreateTypeFace
  |
FontConfigTypeface::LegacyCreateTypeface //Will check SkTypefaceCache in this method call
  |
SkFontConfigInterface::matchFamilyName()
  |
SkFontConfigInterfaceAndroid::matchFamilyName //Android impl, uses info from parsed xml to resolve name

CONTRIBUTORS
Andrew Mast <andy@cyngn.com>
Clark Scheff <clark@cyngn.com>

Change-Id: I3972adebe76438b710cfc8241f35efd71e90811f

Conflicts:
	include/ports/SkFontConfigInterface.h
	src/core/SkTypeface.cpp
	src/core/SkTypefaceCache.h
Only force purge all when clearing singleton interface

Fix for CYAN-4047

Always forcing the typeface cache to be purged can lead to system
lock ups.  It should only be forced because of a font change, in
which case we want the entire cache purged and then reloaded with
the new fonts.  Calling this any other time should have force set
to false, i.e. when Canvas calls PurgeAll().

Change-Id: Ibdeeeaa1ee67270da365b69c63c9c4914d60374e
Fallback to system's monospace font if theme excludes it

We should always have a monospace font available and if a theme
does not provide one the system's monospace font should be used.

Change-Id: Iaadf2f2c4d0dd7dd46d1eb58a687281440d70227
Themes: Add system font families missing from theme

A theme's fonts may not include all the families defined in the
system's system_fonts.xml.  If a system font family is missing
from the theme's fonts, we add it.

This works for missing monospace fonts as well as other families,
such as serif.

Change-Id: Ib2a71fab582cfdf54f4d374d0c32cfebfaa1564f