diff options
author | android-build-prod (mdb) <android-build-team-robot@google.com> | 2017-11-01 23:14:44 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-11-01 23:14:44 +0000 |
commit | 250b5be586725c87e93cc8876a60d186d3a3880c (patch) | |
tree | f4ed3755cce7e8f88e4fae552604123af1b71040 | |
parent | c466c17e706271394e51ebeee629f2a33eebab52 (diff) | |
parent | 05bbf29d8617c1e0a9472be0f7ea7b2249029d57 (diff) | |
download | webview-250b5be586725c87e93cc8876a60d186d3a3880c.tar.gz |
Merge "Snap for 4429331 from 091c161d12cd3eb0bc79b82fcb884380cedea435 to sdk-release" into sdk-release
-rw-r--r-- | OWNERS | 4 | ||||
-rw-r--r-- | chromium/plat_support/graphics_utils.cpp | 22 | ||||
-rw-r--r-- | nullwebview/java/com/android/webview/nullwebview/NullWebViewFactoryProvider.java | 4 |
3 files changed, 12 insertions, 18 deletions
@@ -0,0 +1,4 @@ +boliu@google.com +sgurun@google.com +tobiasjs@google.com +torne@google.com diff --git a/chromium/plat_support/graphics_utils.cpp b/chromium/plat_support/graphics_utils.cpp index 5d8d0a5..89beb75 100644 --- a/chromium/plat_support/graphics_utils.cpp +++ b/chromium/plat_support/graphics_utils.cpp @@ -38,15 +38,15 @@ namespace { class PixelInfo : public AwPixelInfo { public: - explicit PixelInfo(SkCanvas* canvas); + explicit PixelInfo(android::Canvas* canvas); ~PixelInfo(); }; -PixelInfo::PixelInfo(SkCanvas* canvas) { +PixelInfo::PixelInfo(android::Canvas* canvas) { memset(this, 0, sizeof(AwPixelInfo)); version = kAwPixelInfoVersion; - state = SkCanvasStateUtils::CaptureCanvasState(canvas); + state = canvas->captureCanvasState(); } PixelInfo::~PixelInfo() { @@ -59,21 +59,7 @@ AwPixelInfo* GetPixels(JNIEnv* env, jobject java_canvas) { if (!nativeCanvas) return NULL; - SkCanvas* canvas = nativeCanvas->asSkCanvas(); - if (!canvas) - return NULL; - - // Workarounds for http://crbug.com/271096: SW draw only supports - // translate & scale transforms, and a simple rectangular clip. - // (This also avoids significant wasted time in calling - // SkCanvasStateUtils::CaptureCanvasState when the clip is complex). - if (!canvas->isClipRect() || - (canvas->getTotalMatrix().getType() & - ~(SkMatrix::kTranslate_Mask | SkMatrix::kScale_Mask))) { - return NULL; - } - - PixelInfo* pixels = new PixelInfo(canvas); + PixelInfo* pixels = new PixelInfo(nativeCanvas); if (!pixels->state) { delete pixels; pixels = NULL; diff --git a/nullwebview/java/com/android/webview/nullwebview/NullWebViewFactoryProvider.java b/nullwebview/java/com/android/webview/nullwebview/NullWebViewFactoryProvider.java index 8132a34..ed12446 100644 --- a/nullwebview/java/com/android/webview/nullwebview/NullWebViewFactoryProvider.java +++ b/nullwebview/java/com/android/webview/nullwebview/NullWebViewFactoryProvider.java @@ -31,6 +31,10 @@ import android.webkit.WebViewProvider; public class NullWebViewFactoryProvider implements WebViewFactoryProvider { + public static WebViewFactoryProvider create(WebViewDelegate delegate) { + return new NullWebViewFactoryProvider(delegate); + } + public NullWebViewFactoryProvider(WebViewDelegate delegate) { } |