Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c705d63 authored by Chris Craik's avatar Chris Craik
Browse files

Fix RenderScript copy tracing sections

bug:21560057

Change-Id: I3b44d04bd908d9549ef7ada5f48f5d94e239d186
parent 85b883ca
Loading
Loading
Loading
Loading
+16 −12
Original line number Diff line number Diff line
@@ -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) {