Chromium Code Reviews| Index: ui/android/java/src/org/chromium/ui/gfx/BitmapHelper.java |
| diff --git a/ui/android/java/src/org/chromium/ui/gfx/BitmapHelper.java b/ui/android/java/src/org/chromium/ui/gfx/BitmapHelper.java |
| index 10eb53a3188bfc8700239f1e482b7bd76a375b2e..f12e2380e1f7dfa864b8f0ee6767225f039d7558 100644 |
| --- a/ui/android/java/src/org/chromium/ui/gfx/BitmapHelper.java |
| +++ b/ui/android/java/src/org/chromium/ui/gfx/BitmapHelper.java |
| @@ -75,4 +75,27 @@ public class BitmapHelper { |
| return inSampleSize; |
| } |
| + |
| + /** |
| + * Provides a matching string for the Bitmap.Config value passed. |
| + * |
| + * @param Bitmap Configuration value. |
| + * @return Matching string for the Bitmap.Config value passed. |
| + */ |
| + @CalledByNative |
| + private static String bitmapConfigToString(Bitmap.Config bitmap_config) { |
| + |
| + switch (bitmap_config) { |
| + case ALPHA_8: |
| + return "ALPHA_8"; |
|
no sievers
2014/02/13 21:34:24
Sorry I missed earlier that the strings are entire
sivag
2014/02/14 12:24:25
Done.
|
| + case ARGB_4444: |
| + return "ARGB_4444"; |
| + case ARGB_8888: |
| + return "ARGB_8888"; |
| + case RGB_565: |
| + return "RGB_565"; |
| + default: |
| + return "NO_CONFIG"; |
| + } |
| + } |
| } |