blob: 57d0c6bb96c59c978672aca79ae2beec2ddcfd5f [file] [log] [blame]
Hak Matsuda1ca4f622014-01-31 16:37:51 -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
Hak Matsuda1ca4f622014-01-31 16:37:51 -080018<sample>
19 <name>RenderScriptIntrinsic</name>
20 <group>RenderScript</group>
21 <package>com.example.android.renderscriptintrinsic</package>
22
Yuichi Araki39b01292016-07-08 13:54:27 +090023 <minSdk>14</minSdk>
Hak Matsuda1ca4f622014-01-31 16:37:51 -080024
Hak Matsuda1ca4f622014-01-31 16:37:51 -080025 <defaultConfig>
Yuichi Araki39b01292016-07-08 13:54:27 +090026 renderscriptTargetApi 24
Trevor Johns492618f2014-12-04 18:53:13 -080027 renderscriptSupportModeEnabled true
Hak Matsuda1ca4f622014-01-31 16:37:51 -080028 </defaultConfig>
29
30 <strings>
31 <intro>
32 <![CDATA[
Yuichi Araki39b01292016-07-08 13:54:27 +090033RenderScriptIntrinsic sample that demonstrates how to use RenderScript intrinsics.
34Creates several RenderScript intrinsics and shows a filtering result with various parameters.
35Also shows how to extends RadioButton with StateListDrawable.
Hak Matsuda1ca4f622014-01-31 16:37:51 -080036 ]]>
37 </intro>
38 </strings>
39
40 <template src="base"/>
Hak Matsuda1ca4f622014-01-31 16:37:51 -080041
Trevor Johns1eba6c62014-12-16 04:28:09 -080042 <metadata>
43 <status>PUBLISHED</status>
44 <categories>RenderScript</categories>
45 <technologies>Android</technologies>
46 <languages>Java</languages>
47 <solutions>Mobile</solutions>
48 <level>EXPERT</level>
49 <icon>screenshots/icon-web.png</icon>
50 <screenshots>
51 <img>screenshots/main.png</img>
52 </screenshots>
53 <api_refs>
54 <android>android.renderscript.RenderScript</android>
55 <android>android.renderscript.ScriptIntrinsicBlur</android>
56 <android>android.renderscript.ScriptIntrinsicConvolve5x5</android>
57 <android>android.renderscript.ScriptIntrinsicColorMatrix</android>
Trevor Johns1eba6c62014-12-16 04:28:09 -080058 </api_refs>
59
60 <description>
61<![CDATA[
62RenderScriptIntrinsic sample that demonstrates how to use RenderScript intrinsics.
63Creates several RenderScript intrinsics and shows a filtering result with various parameters.
64Also shows how to extends RedioButton with StateListDrawable.
65]]>
66 </description>
67
68 <intro>
Yuichi Araki39b01292016-07-08 13:54:27 +090069 <![CDATA[
70[RenderScript][1] is a framework for running computationally intensive tasks at high performance on
71Android. RenderScript is primarily oriented for use with data-parallel computation, although serial
72computationally intensive workloads can benefit as well.
Trevor Johns1eba6c62014-12-16 04:28:09 -080073
74RenderScript **intrinsics** are built-in functions that perform well-defined operations often seen
75in image processing. Intrinsics provide extremely high-performance implementations of standard
76functions with a minimal amount of code.
77
78This sample shows how to access and use the blur, convolve, and matrix intrinsics:
79
80```java
81mScriptBlur = ScriptIntrinsicBlur.create(mRS, Element.U8_4(mRS));
82mScriptConvolve = ScriptIntrinsicConvolve5x5.create(mRS,
83 Element.U8_4(mRS));
84mScriptMatrix = ScriptIntrinsicColorMatrix.create(mRS,
85 Element.U8_4(mRS));
86```
87
Yuichi Araki39b01292016-07-08 13:54:27 +090088RenderScript intrinsics will usually be the fastest possible way for a developer to perform these
89operations. The Android team works closely with our partners to ensure that the intrinsics perform
90as fast as possible on their architectures — often far beyond anything that can be achieved in a
91general-purpose language.
Trevor Johns1eba6c62014-12-16 04:28:09 -080092
93[1]: http://developer.android.com/guide/topics/renderscript/compute.html
94]]>
95 </intro>
96 </metadata>
Hak Matsuda1ca4f622014-01-31 16:37:51 -080097</sample>