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

Commit 0f5b7bc2 authored by Stephen Hines's avatar Stephen Hines Committed by Android Git Automerger
Browse files

am 79a1bde2: Merge "Add a flag to the API to specify -O0 on the bcc command line."

* commit '79a1bde2':
  Add a flag to the API to specify -O0 on the bcc command line.
parents 71165ea6 79a1bde2
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -96,6 +96,14 @@ public class RenderScript {
    */
    public static final int CREATE_FLAG_WAIT_FOR_ATTACH = 0x0008;

    /**
     * @hide
     * Context creation flag which specifies that optimization level 0 is
     * passed to the device compiler upon execution of the RenderScript kernel.
     * The default optimization level is 3.
    */
    public static final int CREATE_FLAG_OPT_LEVEL_0 = 0x0010;

    /*
     * Detect the bitness of the VM to allow FieldPacker to do the right thing.
     */
@@ -1350,7 +1358,8 @@ public class RenderScript {
            return null;
        }

        if ((flags & ~(CREATE_FLAG_LOW_LATENCY | CREATE_FLAG_LOW_POWER | CREATE_FLAG_WAIT_FOR_ATTACH)) != 0) {
        if ((flags & ~(CREATE_FLAG_LOW_LATENCY | CREATE_FLAG_LOW_POWER |
                       CREATE_FLAG_WAIT_FOR_ATTACH | CREATE_FLAG_OPT_LEVEL_0)) != 0) {
            throw new RSIllegalArgumentException("Invalid flags passed.");
        }