| Index: ui/gfx/android/java_bitmap.h
|
| diff --git a/ui/gfx/android/java_bitmap.h b/ui/gfx/android/java_bitmap.h
|
| index 9d1e4432cb7dcafaed425e7b20159b82875f3b31..cb1077d73e2ca49f6c8af26c8a107bda67398d6c 100644
|
| --- a/ui/gfx/android/java_bitmap.h
|
| +++ b/ui/gfx/android/java_bitmap.h
|
| @@ -8,12 +8,20 @@
|
| #include <jni.h>
|
|
|
| #include "base/android/scoped_java_ref.h"
|
| +#include "third_party/skia/include/core/SkBitmap.h"
|
| #include "ui/gfx/size.h"
|
|
|
| -class SkBitmap;
|
| -
|
| namespace gfx {
|
|
|
| +// Define Bitmap Config values like BITMAP_CONFIG_ARGB_8888 in a
|
| +// way that ensures they're always the same than their Java counterpart.
|
| +
|
| +enum BitmapConfig {
|
| +#define DEFINE_BITMAP_CONFIG(x, y) BITMAP_##x = y,
|
| +#include "bitmap_config_list.h"
|
| +#undef DEFINE_BITMAP_CONFIG
|
| +};
|
| +
|
| // This class wraps a JNI AndroidBitmap object to make it easier to use. It
|
| // handles locking and unlocking of the underlying pixels, along with wrapping
|
| // various JNI methods.
|
| @@ -51,6 +59,9 @@ GFX_EXPORT SkBitmap CreateSkBitmapFromJavaBitmap(JavaBitmap& jbitmap);
|
| GFX_EXPORT SkBitmap CreateSkBitmapFromResource(const char* name,
|
| gfx::Size size);
|
|
|
| +// Returns a Skia config value for the requested input java Bitmap.Config.
|
| +GFX_EXPORT SkBitmap::Config ConvertToSkiaConfig(jobject bitmap_config);
|
| +
|
| } // namespace gfx
|
|
|
| #endif // UI_GFX_ANDROID_JAVA_BITMAP_H_
|
|
|