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

Commit 8348c351 authored by Stephen Hines's avatar Stephen Hines Committed by Android Git Automerger
Browse files

am 4fea742c: Merge "Update copyFrom(BaseObj[]) for large objects."

* commit '4fea742c':
  Update copyFrom(BaseObj[]) for large objects.
parents 3964ea46 4fea742c
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -518,13 +518,20 @@ public class Allocation extends BaseObj {
            throw new RSIllegalArgumentException("Array size mismatch, allocation sizeX = " +
                                                 mCurrentCount + ", array length = " + d.length);
        }
        // FIXME: requires 64-bit path

        if (RenderScript.sPointerSize == 8) {
            long i[] = new long[d.length * 4];
            for (int ct=0; ct < d.length; ct++) {
                i[ct * 4] = d[ct].getID(mRS);
            }
            copy1DRangeFromUnchecked(0, mCurrentCount, i);
        } else {
            int i[] = new int[d.length];
            for (int ct=0; ct < d.length; ct++) {
                i[ct] = (int)d[ct].getID(mRS);
            }
            copy1DRangeFromUnchecked(0, mCurrentCount, i);
        }
        Trace.traceEnd(RenderScript.TRACE_TAG);
    }