Apply changes to the WebView for compatibility with r5967 of Skia.

bug: 6906025
Change-Id: Ia434cc8b6fc00db391ca9e6686de9b9f35d63b22
diff --git a/Android.mk b/Android.mk
index 3d59ea7..6b46111 100644
--- a/Android.mk
+++ b/Android.mk
@@ -87,6 +87,7 @@
 	external/skia/include/images \
 	external/skia/include/ports \
 	external/skia/include/utils \
+	external/skia/src/core \
 	external/skia/src/ports \
 	external/sqlite/dist \
 	frameworks/base/core/jni/android/graphics \
@@ -322,7 +323,7 @@
 endif
 
 # Build the list of static libraries
-LOCAL_STATIC_LIBRARIES := libxml2 libxslt libhyphenation libskiagpu libv8
+LOCAL_STATIC_LIBRARIES := libxml2 libxslt libhyphenation libv8
 
 ifeq ($(ENABLE_AUTOFILL),true)
 LOCAL_SHARED_LIBRARIES += libexpat
diff --git a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextSkia.cpp b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextSkia.cpp
index fcd9ade..cd3ef7d 100644
--- a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextSkia.cpp
+++ b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextSkia.cpp
@@ -9,6 +9,7 @@
 #include "GraphicsContext.h"
 #include "SkCanvas.h"
 #include "SkCornerPathEffect.h"
+#include "SkMathPriv.h"
 #include "SkPaint.h"
 #include "SkShader.h"
 #include "SkiaUtils.h"
@@ -272,8 +273,7 @@
     for (size_t i = 1; i < numPoints; i++)
         path.lineTo(SkFloatToScalar(points[i].x()), SkFloatToScalar(points[i].y()));
 
-    if (mCanvas->quickReject(path, shouldAntialias ?
-            SkCanvas::kAA_EdgeType : SkCanvas::kBW_EdgeType)) {
+    if (mCanvas->quickReject(path)) {
         return;
     }
 
diff --git a/Source/WebCore/platform/graphics/android/rendering/GaneshContext.cpp b/Source/WebCore/platform/graphics/android/rendering/GaneshContext.cpp
index 5c4b453..0ea8d93 100644
--- a/Source/WebCore/platform/graphics/android/rendering/GaneshContext.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/GaneshContext.cpp
@@ -152,7 +152,7 @@
         GrPlatformRenderTargetDesc renderTargetDesc;
         renderTargetDesc.fWidth = TilesManager::tileWidth();
         renderTargetDesc.fHeight = TilesManager::tileHeight();
-        renderTargetDesc.fConfig = kRGBA_8888_PM_GrPixelConfig;
+        renderTargetDesc.fConfig = kRGBA_8888_GrPixelConfig;
         renderTargetDesc.fSampleCnt = 0;
         renderTargetDesc.fStencilBits = 8;
         renderTargetDesc.fRenderTargetHandle = 0;
diff --git a/Source/WebKit/android/jni/PicturePile.cpp b/Source/WebKit/android/jni/PicturePile.cpp
index 44cfccb..f6fe5db 100644
--- a/Source/WebKit/android/jni/PicturePile.cpp
+++ b/Source/WebKit/android/jni/PicturePile.cpp
@@ -84,8 +84,7 @@
      * the rect bounds of the SkRegion for the clip, so this still can't be
      * used for translucent surfaces
      */
-    if (canvas->quickReject(SkRect::MakeWH(m_size.width(), m_size.height()),
-            SkCanvas::kBW_EdgeType))
+    if (canvas->quickReject(SkRect::MakeWH(m_size.width(), m_size.height())))
         return;
     drawWithClipRecursive(canvas, m_pile.size() - 1);
 }
@@ -102,7 +101,7 @@
     if (index < 0)
         return;
     PictureContainer& pc = m_pile[index];
-    if (pc.picture && !canvas->quickReject(pc.area, SkCanvas::kBW_EdgeType)) {
+    if (pc.picture && !canvas->quickReject(pc.area)) {
         int saved = canvas->save(SkCanvas::kClip_SaveFlag);
         if (canvas->clipRect(pc.area, SkRegion::kDifference_Op))
             drawWithClipRecursive(canvas, index - 1);
diff --git a/Source/WebKit/android/jni/ViewStateSerializer.cpp b/Source/WebKit/android/jni/ViewStateSerializer.cpp
index 8963837..ebbccfe 100644
--- a/Source/WebKit/android/jni/ViewStateSerializer.cpp
+++ b/Source/WebKit/android/jni/ViewStateSerializer.cpp
@@ -40,7 +40,8 @@
 #include "LayerContent.h"
 #include "PictureLayerContent.h"
 #include "ScrollableLayerAndroid.h"
-#include "SkFlattenable.h"
+#include "SkOrderedReadBuffer.h"
+#include "SkOrderedWriteBuffer.h"
 #include "SkPicture.h"
 #include "TilesManager.h"
 
@@ -381,7 +382,7 @@
     bool hasContentsImage = layer->m_imageCRC != 0;
     stream->writeBool(hasContentsImage);
     if (hasContentsImage) {
-        SkFlattenableWriteBuffer buffer(1024);
+        SkOrderedWriteBuffer buffer(1024);
         buffer.setFlags(SkFlattenableWriteBuffer::kCrossProcess_Flag);
         ImageTexture* imagetexture =
                 ImagesManager::instance()->retainImage(layer->m_imageCRC);
@@ -500,7 +501,7 @@
         int size = stream->readU32();
         SkAutoMalloc storage(size);
         stream->read(storage.get(), size);
-        SkFlattenableReadBuffer buffer(storage.get(), size);
+        SkOrderedReadBuffer buffer(storage.get(), size);
         SkBitmap contentsImage;
         contentsImage.unflatten(buffer);
         SkBitmapRef* imageRef = new SkBitmapRef(contentsImage);
diff --git a/Source/WebKit/android/plugins/ANPCanvasInterface.cpp b/Source/WebKit/android/plugins/ANPCanvasInterface.cpp
index d6d89ff..4519587 100644
--- a/Source/WebKit/android/plugins/ANPCanvasInterface.cpp
+++ b/Source/WebKit/android/plugins/ANPCanvasInterface.cpp
@@ -80,8 +80,7 @@
 static bool anp_getLocalClipBounds(ANPCanvas* canvas, ANPRectF* r,
                                    bool antialias) {
     SkRect bounds;
-    if (canvas->skcanvas->getClipBounds(&bounds,
-                antialias ? SkCanvas::kAA_EdgeType : SkCanvas::kBW_EdgeType)) {
+    if (canvas->skcanvas->getClipBounds(&bounds)) {
         SkANP::SetRect(r, bounds);
         return true;
     }