Snapshot from http://skia.googlecode.com/svn/trunk@12108

Change-Id: Ia710b27d97e938df06014b7b61a3767bd3be1eb5
skia: NEON blit optimizations from Samsung

 * Improves performance across the board

Change-Id: I3aa66f69140acf3992fbeb6346de4444195fdf92
Snapshot from http://skia.googlecode.com/svn/trunk@12682

Change-Id: I0470d8e53bf019f410509180b95950f20f98a5e8
Merge Skia r12682 into Android.

Conflicts:
	include/core/SkDraw.h
	include/pdf/SkPDFDevice.h
	include/utils/SkCanvasStateUtils.h
	include/utils/SkFrontBufferedStream.h
	src/core/SkDevice.cpp
	src/core/SkDeviceLooper.cpp
	src/core/SkDeviceLooper.h
	src/core/SkRRect.cpp
	src/doc/SkDocument_PDF.cpp
	src/effects/SkBlurMaskFilter.cpp
	src/fonts/SkFontMgr_fontconfig.cpp
	src/gpu/GrAAHairLinePathRenderer.cpp
	src/gpu/GrAAHairLinePathRenderer.h
	src/gpu/GrTextContext.cpp
	src/images/SkImageDecoder_libpng.cpp
	src/images/SkScaledBitmapSampler.cpp
	src/images/SkScaledBitmapSampler.h
	src/pdf/SkPDFDevice.cpp
	src/pdf/SkPDFDeviceFlattener.cpp
	src/ports/SkFontConfigInterface_android.cpp
	src/ports/SkFontHost_FreeType.cpp
	src/ports/SkFontHost_FreeType_common.cpp
	src/utils/SkCanvasStack.cpp
	src/utils/SkCanvasStack.h
	src/utils/SkCanvasStateUtils.cpp
	src/utils/SkDeferredCanvas.cpp
	src/utils/SkFrontBufferedStream.cpp
	src/utils/SkPictureUtils.cpp

Change-Id: Ice86d9769ed99f804932d8839acfdea695cb6d28
Fix issue in the image decoders where the bitmap config was not properly set.

This is a modified cherry-pick of https://code.google.com/p/skia/source/detail?r=13503

bug: 12968474
Change-Id: I245eea4f05f402ca24849d5d2fe354c69526d03d
Apply all Skia changes made to the chromium m33 branch of Skia.

This CL was generated using "svn diff -r12932:12963" on the skia branch /chrome/m33_1750

------------------------------------------------------------------------
r12963 | fmalita@google.com | 2014-01-08 12:17:22 -0500 (Wed, 08 Jan 2014) | 1 line

Cherrypick r12846 into m33_1750 for http://crbug.com/330293
------------------------------------------------------------------------
r12945 | sugoi@google.com | 2014-01-07 13:15:39 -0500 (Tue, 07 Jan 2014) | 1 line

cherrypick changes into branch m33_1750 to fix http://crbug.com/329254
------------------------------------------------------------------------
r12934 | vandebo@chromium.org | 2014-01-06 18:40:00 -0500 (Mon, 06 Jan 2014) | 17 lines

Merge 12729 "[PDF] Fix clipping in xfermode improvement."

> [PDF] Fix clipping in xfermode improvement.
>
> In some cases, the wrong clip (src clip instead of initial clip) was used.
> Switch almost exclusively to initial clip because it is safe and generates a smaller result.
>
> BUG=chromium:328009
> R=reed@google.com, bungeman@google.com
>
> Author: vandebo@chromium.org
>
> Review URL: https://codereview.chromium.org/116423004

TBR=vandebo@chromium.org

Review URL: https://codereview.chromium.org/125293004
------------------------------------------------------------------------

Change-Id: I1d7b49c7dbd32f8d024492d4576879dbecb1d19c
Skia: bug fix for SkBitmapProcState_shaderproc.h

Take care of "dx" being 0 case

Change-Id: Ie492c0454d6c8876ea9bb48e911de77cc78a8e98
Fix x86 build. DO NOT MERGE

Bug: 13246311

Change-Id: I6cd6a7dd95f2ca693412dbf71cc858c89480f990
Fix build on arm devices w/o neon. DO NOT MERGE

SkMorphologyGetPlatformProc is defined in both SkMorphology_opts_none
and opts_check_arm, so don't build both files.

Bug: 13246311
Change-Id: I06e75c2a99a8820b79b1c068b136349027814ae3
DO NOT MERGE - Allow buffered stream to work with an offset.

Merge fix for nativeDecodeFileDescriptor into MR2.
BUG:13191516

Original CL below:

Allow buffered stream to work with an offset.

If the stream being buffered is buffered from somewhere other than
the start, the SkFrontBufferedStream needs to take that into account
when reporting its length.

Required for https://googleplex-android-review.googlesource.com/#/c/415165/1
in frameworks/base to work.

BUG:12807677
BUG:12895876
Cherry-pick from: I675397f5cebb7c7d8bc9f76acb5265d7209cbbc2

Change-Id: Ia9aa7451fd6f72f0f5c8ba68199f0a74c0475178
Add an Android version of SkRefCnt - DO NOT MERGE

This version adds SkRefCnt::deref(). This allows chromium on Android
to build against the system version of Skia, since chromium requires
this function.

BUG:13246311
Change-Id: I988ef1f76e4e10918ca896e4488d65ccc94837c6
Disable optimizations for chromium m33.

These optimizations are disabled in chromium m33, so disable them in
Android's build of Skia, against which chromium/webview will link.

BUG:13246311
Change-Id: I8e64dea2d232a6b3616c225f1cd269f086b056e3
Set GR_GL_IGNORE_ES3_MSAA to 0. DO NOT MERGE

GR_GL_IGNORE_ES3_MSAA is a workaround for older versions of Chrome, and
M33 (the version we're using) no longer needs it.

BUG:13246311
Change-Id: Ib3cffe72b0b0b0e1fe1b441f3f716dd62ae17ad3
Merge "Set GR_GL_IGNORE_ES3_MSAA to 0. DO NOT MERGE" into m33
Merge "Disable optimizations for chromium m33." into m33
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
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
Merge tag 'android-4.4.3_r1' into HEAD

Android 4.4.3 release 1

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
Merge tag 'android-4.4.3_r1.1' into HEAD

Conflicts:
	Android.mk
	include/ports/SkFontConfigInterface.h
	src/core/SkTypeface.cpp
	src/core/SkTypefaceCache.cpp
	src/core/SkTypefaceCache.h
	src/ports/SkFontConfigInterface_android.cpp
	src/ports/SkFontConfigParser_android.cpp