am 183f97b7: am 1c12f9e7: malloc some advances

* commit '183f97b72faf7a0f45ad66e1b3fd9a4343cc7482':
  malloc some advances
This commit is contained in:
Victoria Lease
2014-03-19 14:32:15 -07:00
committed by Android Git Automerger

View File

@ -554,7 +554,7 @@ public:
return 0;
}
}
jfloat advancesArray[count];
jfloat* advancesArray = new jfloat[count];
jfloat totalAdvance = 0;
TextLayout::getTextRunAdvances(paint, text, start, count, contextCount, flags,
@ -563,6 +563,7 @@ public:
if (advances != NULL) {
env->SetFloatArrayRegion(advances, advancesIndex, count, advancesArray);
}
delete [] advancesArray;
return totalAdvance;
}