From 4d31493c3fa47a28b2753bc5b99e2074b6a7a4df Mon Sep 17 00:00:00 2001 From: John Reck Date: Tue, 22 May 2012 10:48:45 -0700 Subject: Handle more favicon decoding error cases Bug: 6517530 Switch to having webcoreImageToSkBitmap return a pointer instead as it makes dealing with error cases easier. Also add a check to see if SkImageDecoder::DecodeMemory returned true or false, as if it returns false we may have already allocated pixels (so isNull = false), however it might not have valid data or any config Also aggressively check that we have a valid bitmap with a valid config Change-Id: I2a2e856a389d73cdda319eaeaee5d1279a9e2eb6 --- Source/WebKit/android/jni/WebIconDatabase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/WebKit/android/jni/WebIconDatabase.h') diff --git a/Source/WebKit/android/jni/WebIconDatabase.h b/Source/WebKit/android/jni/WebIconDatabase.h index c3e7947..7b7c937 100644 --- a/Source/WebKit/android/jni/WebIconDatabase.h +++ b/Source/WebKit/android/jni/WebIconDatabase.h @@ -74,7 +74,7 @@ namespace android { bool mDeliveryRequested; }; - SkBitmap webcoreImageToSkBitmap(WebCore::Image* icon); + SkBitmap* webcoreImageToSkBitmap(WebCore::Image* icon); jobject webcoreImageToJavaBitmap(JNIEnv* env, WebCore::Image* icon); }; -- cgit v1.1