am 8c1e287b: Merge "Fix RenderScript copy tracing sections" into mnc-dev

* commit '8c1e287bf801d98cbaa6df904524625c3935fdd0':
  Fix RenderScript copy tracing sections
This commit is contained in:
Chris Craik
2015-06-01 21:41:40 +00:00
committed by Android Git Automerger

View File

@ -1052,6 +1052,7 @@ public class Allocation extends BaseObj {
mSelectedLOD, mSelectedFace.mID,
count, 1, data.getID(mRS), dataOff, 0,
data.mSelectedLOD, data.mSelectedFace.mID);
Trace.traceEnd(RenderScript.TRACE_TAG);
}
private void validate2DRange(int xoff, int yoff, int w, int h) {
@ -1213,6 +1214,7 @@ public class Allocation extends BaseObj {
* @param data the Bitmap to be copied
*/
public void copy2DRangeFrom(int xoff, int yoff, Bitmap data) {
try {
Trace.traceBegin(RenderScript.TRACE_TAG, "copy2DRangeFrom");
mRS.validate();
if (data.getConfig() == null) {
@ -1225,8 +1227,10 @@ public class Allocation extends BaseObj {
validateBitmapFormat(data);
validate2DRange(xoff, yoff, data.getWidth(), data.getHeight());
mRS.nAllocationData2D(getIDSafe(), xoff, yoff, mSelectedLOD, mSelectedFace.mID, data);
} finally {
Trace.traceEnd(RenderScript.TRACE_TAG);
}
}
private void validate3DRange(int xoff, int yoff, int zoff, int w, int h, int d) {
if (mAdaptedAllocation != null) {