summaryrefslogtreecommitdiff
path: root/platform/android/src/text/local_glyph_rasterizer_jni.hpp
diff options
context:
space:
mode:
authorKiyong Jung <autoexec.bat@navercorp.com>2018-07-19 12:08:40 +0900
committerTobrun <tobrun@mapbox.com>2018-07-27 11:24:26 +0200
commit37bbed5b9c3f95dc1e596b885702808202e4193c (patch)
tree5d0527a5c6fbc3e99eabff8fd3998190ae187493 /platform/android/src/text/local_glyph_rasterizer_jni.hpp
parent94ad8e2ff8928bec316dfcc9790db7b522673d3e (diff)
downloadqtlocation-mapboxgl-37bbed5b9c3f95dc1e596b885702808202e4193c.tar.gz
[android] Reuse Bitmap, Paint & Canvas instances in LocalGlyphRasterizer
- Make LocalGlyphRasterizer.drawGlyphBitmap() non-static - Store and reuse Bitmap, Paint & Canvas instances
Diffstat (limited to 'platform/android/src/text/local_glyph_rasterizer_jni.hpp')
-rw-r--r--platform/android/src/text/local_glyph_rasterizer_jni.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/platform/android/src/text/local_glyph_rasterizer_jni.hpp b/platform/android/src/text/local_glyph_rasterizer_jni.hpp
index 38d98d5368..1c83ea5f58 100644
--- a/platform/android/src/text/local_glyph_rasterizer_jni.hpp
+++ b/platform/android/src/text/local_glyph_rasterizer_jni.hpp
@@ -17,14 +17,18 @@ namespace android {
class LocalGlyphRasterizer {
public:
- static PremultipliedImage drawGlyphBitmap(const std::string& fontFamily, const bool bold, const char16_t glyphID);
-
static constexpr auto Name() { return "com/mapbox/mapboxsdk/text/LocalGlyphRasterizer"; };
static jni::Class<LocalGlyphRasterizer> javaClass;
static void registerNative(jni::JNIEnv&);
+ LocalGlyphRasterizer();
+
+ PremultipliedImage drawGlyphBitmap(const std::string& fontFamily, const bool bold, const char16_t glyphID);
+
+private:
+ jni::UniqueObject<LocalGlyphRasterizer> javaObject;
};
} // namespace android