From 0edad69ab4ec2f2bfce4b85d4e6d5f74f7ba1bb5 Mon Sep 17 00:00:00 2001
From: Joe Fernandez
Date: Fri, 13 Sep 2013 12:40:56 -0700
Subject: Update RenderScript docs to include Support Library APIs
Added new section to explain how to access the Support Library
RenderScript APIs in Eclipse.
Change-Id: Ife6e25bcc7b91c39bb399d1ace624e106a3f38bc
(cherry picked from commit f82b04d4ecb9450afc8a3679e7178bfa4ca782b8)
---
docs/html/guide/topics/renderscript/compute.jd | 83 +++++++++++++++++++++++++-
1 file changed, 82 insertions(+), 1 deletion(-)
(limited to 'docs/html/guide/topics')
diff --git a/docs/html/guide/topics/renderscript/compute.jd b/docs/html/guide/topics/renderscript/compute.jd
index 607d16e..14a1682 100644
--- a/docs/html/guide/topics/renderscript/compute.jd
+++ b/docs/html/guide/topics/renderscript/compute.jd
@@ -10,6 +10,11 @@ parent.link=index.html
- Writing a RenderScript Kernel
+ - Accessing RenderScript Java APIs
+
+ - Setting Up Your Development Environment
+
+
- Using RenderScript from Java Code
@@ -144,9 +149,85 @@ different level of floating point precision:
beneficial on some architectures due to additional optimizations only available with relaxed
precision (such as SIMD CPU instructions).
+
+Accessing RenderScript Java APIs
+
+When developing an Android application that uses RenderScript, you can access its Java API in
+ one of two ways. The APIs are available in the {@link android.renderscript} package
+ on devices running Android 3.0 (API level 11) and higher. These are the original APIs for
+ RenderScript. The APIs are also available as a Support Library in the
+ {@link android.support.v8.renderscript} package, which allow you to use them on devices running
+ Android 2.2 (API level 8) and higher.
+
+We strongly recommend using the Support Library APIs for accessing RenderScript because they
+ include the latest improvements to the RenderScript compute framework and provide a wider range
+ of device compatibility. Using the RenderScript APIs in the Support Library requires specific
+ setup procedures for your development environment, which is described in the next section.
+
+
+Using the RenderScript Support Library APIs
+
+In order to use the Support Library RenderScript APIs, you must configure your development
+ environment to be able to access them. The following Android SDK tools are required for using
+ these APIs:
+
+
+ - Android SDK Tools revision 22.2 or higher
+ - Android SDK Build-tools revision 18.1.0 or higher
+
+
+You can check and update the installed version of these tools in the
+ Android SDK Manager.
+
+
+ Note: Use of Support Library RenderScript APIs is not currently supported with
+ Android Studio or Gradle-based builds.
+
+
+To use the Support Library RenderScript APIs in Eclipse:
+
+
+ - Make sure you have the required Android SDK version and Build Tools version installed.
+ - Open the {@code project.properties} file in the root folder of your application project.
+ - Add the following lines to the file:
+
+renderscript.target=18
+renderscript.support.mode=true
+sdk.buildtools=18.1.0
+
+
+ - In your application classes that use RenderScript, add an import for the Support Library
+ classes:
+
+import android.support.v8.renderscript.*;
+
+
+
+
+The {@code project.properties} settings listed above control specific behavior in the Android
+ build process:
+
+
+ - {@code renderscript.target} - Specifies the bytecode version to be generated. We
+ recommend you set this value the highest available API level and set {@code
+ renderscript.support.mode} to {@code true}. Valid values for this setting are any integer value
+ from 11 to the most recently released API level. If your minimum SDK version specified in your
+ application manifest is set to a higher value, this value is ignored and the target value is set
+ to the minimum SDK version.
+ - {@code renderscript.support.mode} - Specifies that the generated bytecode should fall
+ back to a compatible version if the device it is running on does not support the target version.
+
+ - {@code sdk.buildtools} - The version of the Android SDK build tools to use. This value
+ should be set to 18.1.0 or higher. If this option is not specified, the highest installed build
+ tools version is used. You should always set this value to ensure the consistency of builds
+ across development machines with different configurations.
+
+
+
Using RenderScript from Java Code
-Using RenderScript from Java code relies on the {@link android.renderscript} APIs. Most
+
Using RenderScript from Java code relies on the API classes located in the
+{@link android.renderscript} or the {@link android.support.v8.renderscript} package. Most
applications follow the same basic usage patterns:
--
cgit v1.1