Merge change 873 into donut
* changes: pass original ptrs to JNI release functions (instead of += index to them)
This commit is contained in:
@@ -722,8 +722,7 @@ public:
|
|||||||
jsize textCount = env->GetArrayLength(text);
|
jsize textCount = env->GetArrayLength(text);
|
||||||
SkScalar x_ = SkFloatToScalar(x);
|
SkScalar x_ = SkFloatToScalar(x);
|
||||||
SkScalar y_ = SkFloatToScalar(y);
|
SkScalar y_ = SkFloatToScalar(y);
|
||||||
textArray += index;
|
canvas->drawText(textArray + index, count << 1, x_, y_, *paint);
|
||||||
canvas->drawText(textArray, count << 1, x_, y_, *paint);
|
|
||||||
env->ReleaseCharArrayElements(text, textArray, 0);
|
env->ReleaseCharArrayElements(text, textArray, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -767,8 +766,7 @@ public:
|
|||||||
posPtr[indx].fX = SkFloatToScalar(posArray[indx << 1]);
|
posPtr[indx].fX = SkFloatToScalar(posArray[indx << 1]);
|
||||||
posPtr[indx].fY = SkFloatToScalar(posArray[(indx << 1) + 1]);
|
posPtr[indx].fY = SkFloatToScalar(posArray[(indx << 1) + 1]);
|
||||||
}
|
}
|
||||||
textArray += index;
|
canvas->drawPosText(textArray + index, count << 1, posPtr, *paint);
|
||||||
canvas->drawPosText(textArray, count << 1, posPtr, *paint);
|
|
||||||
if (text) {
|
if (text) {
|
||||||
env->ReleaseCharArrayElements(text, textArray, 0);
|
env->ReleaseCharArrayElements(text, textArray, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user