From 62cb9bdc9def07fefca51939bba4dfb79c122664 Mon Sep 17 00:00:00 2001 From: Stephen McGroarty Date: Fri, 8 May 2015 15:56:58 +0100 Subject: 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 --- rs/java/android/renderscript/RenderScript.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'rs/java/android/renderscript/RenderScript.java') diff --git a/rs/java/android/renderscript/RenderScript.java b/rs/java/android/renderscript/RenderScript.java index 24bc2c16ce03..0505a4bb78f8 100644 --- a/rs/java/android/renderscript/RenderScript.java +++ b/rs/java/android/renderscript/RenderScript.java @@ -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."); } -- cgit v1.2.3