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

Commit 1bdb3be9 authored by Chris Craik's avatar Chris Craik Committed by Gerrit Code Review
Browse files

Merge "Fix RenderScript copy tracing sections"

parents bf17375e f77facd0
Loading
Loading
Loading
Loading
+16 −12
Original line number Diff line number Diff line
@@ -1053,6 +1053,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) {
@@ -1214,6 +1215,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) {
@@ -1226,8 +1228,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) {