summaryrefslogtreecommitdiff
path: root/chromium
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2015-04-22 08:48:50 -0700
committerJohn Reck <jreck@google.com>2015-04-22 08:48:50 -0700
commit165a43df7df4aa5121697893c31b9571492939bc (patch)
tree7caa805233f682f5f2bdf42b5a4756701a910e06 /chromium
parentb2a12d96ed8a6b493dcdcb7b685a166207904df8 (diff)
downloadwebview-165a43df7df4aa5121697893c31b9571492939bc.tar.gz
Revert "Revert "GraphicsJNI update""
This reverts commit c2aae77521ed9db7157053968fe1070b8cac2d6a.
Diffstat (limited to 'chromium')
-rw-r--r--chromium/Android.mk2
-rw-r--r--chromium/plat_support/graphics_utils.cpp6
2 files changed, 7 insertions, 1 deletions
diff --git a/chromium/Android.mk b/chromium/Android.mk
index c0facb2..e015510 100644
--- a/chromium/Android.mk
+++ b/chromium/Android.mk
@@ -34,6 +34,7 @@ LOCAL_SRC_FILES:= \
LOCAL_C_INCLUDES:= \
external/skia/include/core \
frameworks/base/core/jni/android/graphics \
+ frameworks/base/libs/hwui \
frameworks/native/include/ui \
LOCAL_SHARED_LIBRARIES += \
@@ -43,6 +44,7 @@ LOCAL_SHARED_LIBRARIES += \
libskia \
libui \
libutils \
+ libhwui \
LOCAL_MODULE_TAGS := optional
diff --git a/chromium/plat_support/graphics_utils.cpp b/chromium/plat_support/graphics_utils.cpp
index c2017d3..1e88c12 100644
--- a/chromium/plat_support/graphics_utils.cpp
+++ b/chromium/plat_support/graphics_utils.cpp
@@ -55,7 +55,11 @@ PixelInfo::~PixelInfo() {
}
AwPixelInfo* GetPixels(JNIEnv* env, jobject java_canvas) {
- SkCanvas* canvas = GraphicsJNI::getNativeCanvas(env, java_canvas);
+ android::Canvas* nativeCanvas = GraphicsJNI::getNativeCanvas(env, java_canvas);
+ if (!nativeCanvas)
+ return NULL;
+
+ SkCanvas* canvas = nativeCanvas->asSkCanvas();
if (!canvas)
return NULL;