diff options
author | Victoria Lease <violets@google.com> | 2014-03-19 22:27:06 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-03-19 22:27:06 +0000 |
commit | 610d401cb580ee233c008acf8fc076047a0ffdb4 (patch) | |
tree | bbff4cefe1556e9f7e2f04d52711283a7ebc10bd | |
parent | d4375b4713658c06001e9dba7105804c872fc199 (diff) | |
parent | e9c7fd2f2ee7840c61dc66ead3737e437f4e8c10 (diff) | |
download | frameworks_base-610d401cb580ee233c008acf8fc076047a0ffdb4.zip frameworks_base-610d401cb580ee233c008acf8fc076047a0ffdb4.tar.gz frameworks_base-610d401cb580ee233c008acf8fc076047a0ffdb4.tar.bz2 |
am e9c7fd2f: am 55371beb: am 754bf6ab: am c8868db2: am 737d3e5d: am 6b96ecca: am 32753f4f: am 31912122: am 6eb28103: am 183f97b7: am 1c12f9e7: malloc some advances
* commit 'e9c7fd2f2ee7840c61dc66ead3737e437f4e8c10':
malloc some advances
-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 4f6cc37..fd3f327 100644 --- a/core/jni/android/graphics/Paint.cpp +++ b/core/jni/android/graphics/Paint.cpp @@ -566,7 +566,7 @@ public: return 0; } } - jfloat advancesArray[count]; + jfloat* advancesArray = new jfloat[count]; jfloat totalAdvance = 0; TextLayout::getTextRunAdvances(paint, text, start, count, contextCount, flags, @@ -575,6 +575,7 @@ public: if (advances != NULL) { env->SetFloatArrayRegion(advances, advancesIndex, count, advancesArray); } + delete [] advancesArray; return totalAdvance; } |