@@ -261,14 +261,14 @@ static void Bitmap_destructor(JNIEnv* env, jobject, SkBitmap* bitmap) {
261261 delete bitmap;
262262}
263263
264- static void Bitmap_recycle (JNIEnv* env, jobject, SkBitmap* bitmap) {
264+ static jboolean Bitmap_recycle (JNIEnv* env, jobject, SkBitmap* bitmap) {
265265#ifdef USE_OPENGL_RENDERER
266266 if (android::uirenderer::Caches::hasInstance ()) {
267- android::uirenderer::Caches::getInstance ().resourceCache .recycle (bitmap);
268- return ;
267+ return android::uirenderer::Caches::getInstance ().resourceCache .recycle (bitmap);
269268 }
270269#endif // USE_OPENGL_RENDERER
271270 bitmap->setPixels (NULL , NULL );
271+ return true ;
272272}
273273
274274// These must match the int values in Bitmap.java
@@ -665,7 +665,7 @@ static JNINativeMethod gBitmapMethods[] = {
665665 { " nativeCopy" , " (IIZ)Landroid/graphics/Bitmap;" ,
666666 (void *)Bitmap_copy },
667667 { " nativeDestructor" , " (I)V" , (void *)Bitmap_destructor },
668- { " nativeRecycle" , " (I)V " , (void *)Bitmap_recycle },
668+ { " nativeRecycle" , " (I)Z " , (void *)Bitmap_recycle },
669669 { " nativeCompress" , " (IIILjava/io/OutputStream;[B)Z" ,
670670 (void *)Bitmap_compress },
671671 { " nativeErase" , " (II)V" , (void *)Bitmap_erase },
0 commit comments