summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2015-04-14 07:39:47 -0700
committerJohn Reck <jreck@google.com>2015-04-14 15:36:01 -0700
commit260be08b742bf725cf92239c50f47a8c07280130 (patch)
treef5b374da8d95679496d637902af1527aa3b46b21
parent804a83dd8bb2240f803b7ace767f5a2ae3b6d2a7 (diff)
downloadandroid_frameworks_webview-260be08b742bf725cf92239c50f47a8c07280130.tar.gz
android_frameworks_webview-260be08b742bf725cf92239c50f47a8c07280130.tar.bz2
android_frameworks_webview-260be08b742bf725cf92239c50f47a8c07280130.zip
GraphicsJNI update
Change-Id: I72a6721d1130e7e87372beed492b42ac613695b7
-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;