Chromium Code Reviews| Index: ui/gfx/android/java_bitmap.h |
| diff --git a/ui/gfx/android/java_bitmap.h b/ui/gfx/android/java_bitmap.h |
| index 27826f809271a153b1ca6bf76044365547b6e7b3..919e62a91680c2db96301e10ce863efed2b92a17 100644 |
| --- a/ui/gfx/android/java_bitmap.h |
| +++ b/ui/gfx/android/java_bitmap.h |
| @@ -30,7 +30,7 @@ enum BitmapFormat { |
| // various JNI methods. |
| class GFX_EXPORT JavaBitmap { |
| public: |
| - explicit JavaBitmap(jobject bitmap); |
| + explicit JavaBitmap(const base::android::JavaRef<jobject>& bitmap); |
| ~JavaBitmap(); |
| inline void* pixels() { return pixels_; } |
| @@ -42,7 +42,7 @@ class GFX_EXPORT JavaBitmap { |
| inline int byte_count() const { return byte_count_; } |
| private: |
| - jobject bitmap_; |
| + base::android::ScopedJavaGlobalRef<jobject> bitmap_; |
|
Torne
2016/10/14 13:23:29
I'm not sure whether this replacement is actually
aelias_OOO_until_Jul13
2016/10/14 19:30:34
Seems OK. This code was written in 2012 and I thi
Ted C
2016/10/14 20:40:37
agreed...seems like something we can revisit if ne
|
| void* pixels_; |
| gfx::Size size_; |
| int format_; |
| @@ -70,7 +70,8 @@ GFX_EXPORT base::android::ScopedJavaLocalRef<jobject> ConvertToJavaBitmap( |
| GFX_EXPORT SkBitmap CreateSkBitmapFromJavaBitmap(const JavaBitmap& jbitmap); |
| // Returns a Skia color type value for the requested input java Bitmap.Config. |
| -GFX_EXPORT SkColorType ConvertToSkiaColorType(jobject jbitmap_config); |
| +GFX_EXPORT SkColorType |
| +ConvertToSkiaColorType(const base::android::JavaRef<jobject>& jbitmap_config); |
| } // namespace gfx |