blob: 9f0c55871a6a28971d169aa0776ff3759422e331 [file] [log] [blame]
Hak Matsuda19b81512014-01-27 17:50:20 -08001<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 Copyright 2013 The Android Open Source Project
4
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16-->
17
18
19
20<sample>
21 <name>BasicRenderScript</name>
22 <group>RenderScript</group>
23 <package>com.example.android.basicrenderscript</package>
24
25 <!-- change minSdk if needed-->
Max Nash9b3abfd2015-05-09 13:16:44 -070026 <minSdk>16</minSdk>
Hak Matsuda19b81512014-01-27 17:50:20 -080027
28 <dependency_external>'renderscript-v8.jar'</dependency_external>
29
30 <defaultConfig>
31 renderscriptTargetApi 18
Trevor Johns492618f2014-12-04 18:53:13 -080032 renderscriptSupportModeEnabled true
Hak Matsuda19b81512014-01-27 17:50:20 -080033 </defaultConfig>
34
35 <strings>
36 <intro>
37 <![CDATA[
Trevor Johnsec8b1852014-12-12 00:59:51 -080038 This sample demonstrates using RenderScript to perform basic image manipulation. Specifically, it allows users
39 to dynamically adjust the saturation for an image using a slider. A custom RenderScript kernel performs the saturation
Takeshi Hagikuracd878422015-02-19 11:03:50 +090040 adjustment, running the computation on the device\'s GPU or other compute hardware as deemed appropriate by the system.
Hak Matsuda19b81512014-01-27 17:50:20 -080041 ]]>
42 </intro>
43 </strings>
44
45 <template src="base"/>
46 <common src="media"/>
47
Trevor Johnsec8b1852014-12-12 00:59:51 -080048 <metadata>
49 <status>PUBLISHED</status>
50 <categories>RenderScript</categories>
51 <technologies>Android</technologies>
52 <languages>Java</languages>
53 <solutions>Mobile</solutions>
54 <level>EXPERT</level>
55 <icon>screenshots/icon-web.png</icon>
56 <screenshots>
57 <img>screenshots/main.png</img>
58 </screenshots>
59 <api_refs>
60 <android>android.renderscript.RenderScript</android>
61 <android>android.renderscript.Allocation</android>
62 </api_refs>
63
64 <description>
65<![CDATA[
66This sample demonstrates using RenderScript to perform basic image manipulation. Specifically, it allows users
67to dynamically adjust the saturation for an image using a slider. A custom RenderScript kernel performs the saturation
Takeshi Hagikuracd878422015-02-19 11:03:50 +090068adjustment, running the computation on the device\'s GPU or other compute hardware as deemed appropriate by the system.
Trevor Johnsec8b1852014-12-12 00:59:51 -080069]]>
70 </description>
71
72 <intro>
73<![CDATA[
74[RenderScript][1] is a framework for running computationally intensive tasks at high performance on Android. RenderScript is
75primarily oriented for use with data-parallel computation, although serial computationally intensive workloads can
76benefit as well.
77
78The RenderScript runtime will parallelize work across all processors available on a device, such as multi-core CPUs,
79GPUs, or DSPs, allowing you to focus on expressing algorithms rather than scheduling work or load balancing.
80RenderScript is especially useful for applications performing image processing, computational photography, or computer
81vision.
82
83This sample demonstrates the fundamentals of writing a RenderScript compute kernel, and using it to perform basic image
84manipulation. In this case, each pixel is transformed based on a liner interpolation between its original
85RGB value and it's luminance (black-and-white) value, weighted based on the user's specified saturation target.
86
87[1]: http://developer.android.com/guide/topics/renderscript/compute.html
88[2]: http://developer.android.com/reference/renderscript/rs__cl_8rsh.html#a254612a612ff7539b01a1478e03d8697
89]]>
90 </intro>
91 </metadata>
Hak Matsuda19b81512014-01-27 17:50:20 -080092</sample>