diff options
author | Victoria Lease <violets@google.com> | 2014-03-19 14:27:19 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-03-19 14:27:19 -0700 |
commit | 183f97b72faf7a0f45ad66e1b3fd9a4343cc7482 (patch) | |
tree | fe3012c6e05cdb85fa514bb00528098212373ea5 /core | |
parent | da37ed8b0aebdf885a32cbe28e8fd5a2240d38c3 (diff) | |
parent | 1c12f9e76298c757423155ad812890d27effafe8 (diff) | |
download | frameworks_base-183f97b72faf7a0f45ad66e1b3fd9a4343cc7482.zip frameworks_base-183f97b72faf7a0f45ad66e1b3fd9a4343cc7482.tar.gz frameworks_base-183f97b72faf7a0f45ad66e1b3fd9a4343cc7482.tar.bz2 |
am 1c12f9e7: malloc some advances
* commit '1c12f9e76298c757423155ad812890d27effafe8':
malloc some advances
Diffstat (limited to 'core')
-rw-r--r-- | core/jni/android/graphics/Paint.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/jni/android/graphics/Paint.cpp b/core/jni/android/graphics/Paint.cpp index a4d5477..315f2d5 100644 --- a/core/jni/android/graphics/Paint.cpp +++ b/core/jni/android/graphics/Paint.cpp @@ -512,7 +512,7 @@ public: return 0; } } - jfloat advancesArray[count]; + jfloat* advancesArray = new jfloat[count]; jfloat totalAdvance = 0; TextLayout::getTextRunAdvances(paint, text, start, count, contextCount, flags, @@ -521,6 +521,7 @@ public: if (advances != NULL) { env->SetFloatArrayRegion(advances, advancesIndex, count, advancesArray); } + delete [] advancesArray; return totalAdvance; } |