Added in flag to ask context to wait for debugger attach.

Adds in flag CREATE_FLAG_WAIT_FOR_ATTACH with value 0x0008 to the RenderScript API
to be passed down to the C++ implementation to tell it to wait for a debugger to be
attached before executing the kernel.

Change-Id: Ibc4e903efbed1b1fb14cf378d1a8517d5c8d1f26
Signed-off-by: Stephen McGroarty <stephen@codeplay.com>
This commit is contained in:
Stephen McGroarty
2015-05-08 15:56:58 +01:00
parent 809a7645e3
commit 62cb9bdc9d

View File

@@ -89,6 +89,13 @@ public class RenderScript {
*/
public static final int CREATE_FLAG_LOW_POWER = 0x0004;
/**
* @hide
* Context creation flag which instructs the implementation to wait for
* a debugger to be attached before continuing execution.
*/
public static final int CREATE_FLAG_WAIT_FOR_ATTACH = 0x0008;
/*
* Detect the bitness of the VM to allow FieldPacker to do the right thing.
*/
@@ -1343,7 +1350,7 @@ public class RenderScript {
return null;
}
if ((flags & ~(CREATE_FLAG_LOW_LATENCY | CREATE_FLAG_LOW_POWER)) != 0) {
if ((flags & ~(CREATE_FLAG_LOW_LATENCY | CREATE_FLAG_LOW_POWER | CREATE_FLAG_WAIT_FOR_ATTACH)) != 0) {
throw new RSIllegalArgumentException("Invalid flags passed.");
}