malloc some advances
Bug: 13506939
Change-Id: I87ad616960c4f16bc55d8b906049dbd4f001d6a5
(cherry picked from commit 3af2a37e05
)
This commit is contained in:
@ -512,7 +512,7 @@ public:
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
jfloat advancesArray[count];
|
jfloat* advancesArray = new jfloat[count];
|
||||||
jfloat totalAdvance = 0;
|
jfloat totalAdvance = 0;
|
||||||
|
|
||||||
TextLayout::getTextRunAdvances(paint, text, start, count, contextCount, flags,
|
TextLayout::getTextRunAdvances(paint, text, start, count, contextCount, flags,
|
||||||
@ -521,6 +521,7 @@ public:
|
|||||||
if (advances != NULL) {
|
if (advances != NULL) {
|
||||||
env->SetFloatArrayRegion(advances, advancesIndex, count, advancesArray);
|
env->SetFloatArrayRegion(advances, advancesIndex, count, advancesArray);
|
||||||
}
|
}
|
||||||
|
delete [] advancesArray;
|
||||||
return totalAdvance;
|
return totalAdvance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user