OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_GFX_ANDROID_JAVA_BITMAP_H_ | 5 #ifndef UI_GFX_ANDROID_JAVA_BITMAP_H_ |
6 #define UI_GFX_ANDROID_JAVA_BITMAP_H_ | 6 #define UI_GFX_ANDROID_JAVA_BITMAP_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
55 GFX_EXPORT SkBitmap CreateSkBitmapFromJavaBitmap(JavaBitmap& jbitmap); | 55 GFX_EXPORT SkBitmap CreateSkBitmapFromJavaBitmap(JavaBitmap& jbitmap); |
56 | 56 |
57 // If the resource loads successfully, it will be resized to |size|. | 57 // If the resource loads successfully, it will be resized to |size|. |
58 // Note: If the source resource is smaller than |size|, quality may suffer. | 58 // Note: If the source resource is smaller than |size|, quality may suffer. |
59 GFX_EXPORT SkBitmap CreateSkBitmapFromResource(const char* name, | 59 GFX_EXPORT SkBitmap CreateSkBitmapFromResource(const char* name, |
60 gfx::Size size); | 60 gfx::Size size); |
61 | 61 |
62 // Returns a Skia config value for the requested input java Bitmap.Config. | 62 // Returns a Skia config value for the requested input java Bitmap.Config. |
63 GFX_EXPORT SkBitmap::Config ConvertToSkiaConfig(jobject bitmap_config); | 63 GFX_EXPORT SkBitmap::Config ConvertToSkiaConfig(jobject bitmap_config); |
64 | 64 |
65 // Returns the java Bitmap.Config for the requested skia config value. | |
66 GFX_EXPORT base::android::ScopedJavaLocalRef<jobject> ConvertToJavaBitmapConfig( | |
bulach
2014/02/28 13:19:25
I think we can get away without this method.
sivag
2014/03/04 12:36:04
Moved it to a file level static method
sivag
2014/03/04 12:36:04
Done.
| |
67 SkBitmap::Config bitmap_config); | |
68 | |
65 } // namespace gfx | 69 } // namespace gfx |
66 | 70 |
67 #endif // UI_GFX_ANDROID_JAVA_BITMAP_H_ | 71 #endif // UI_GFX_ANDROID_JAVA_BITMAP_H_ |
OLD | NEW |