| Hak Matsuda | 1ca4f62 | 2014-01-31 16:37:51 -0800 | [diff] [blame] | 1 | <?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 Matsuda | 1ca4f62 | 2014-01-31 16:37:51 -0800 | [diff] [blame] | 18 | <sample> |
| 19 | <name>RenderScriptIntrinsic</name> |
| 20 | <group>RenderScript</group> |
| 21 | <package>com.example.android.renderscriptintrinsic</package> |
| 22 | |
| Yuichi Araki | 39b0129 | 2016-07-08 13:54:27 +0900 | [diff] [blame] | 23 | <minSdk>14</minSdk> |
| Hak Matsuda | 1ca4f62 | 2014-01-31 16:37:51 -0800 | [diff] [blame] | 24 | |
| Hak Matsuda | 1ca4f62 | 2014-01-31 16:37:51 -0800 | [diff] [blame] | 25 | <defaultConfig> |
| Yuichi Araki | 39b0129 | 2016-07-08 13:54:27 +0900 | [diff] [blame] | 26 | renderscriptTargetApi 24 |
| Trevor Johns | 492618f | 2014-12-04 18:53:13 -0800 | [diff] [blame] | 27 | renderscriptSupportModeEnabled true |
| Hak Matsuda | 1ca4f62 | 2014-01-31 16:37:51 -0800 | [diff] [blame] | 28 | </defaultConfig> |
| 29 | |
| 30 | <strings> |
| 31 | <intro> |
| 32 | <![CDATA[ |
| Yuichi Araki | 39b0129 | 2016-07-08 13:54:27 +0900 | [diff] [blame] | 33 | RenderScriptIntrinsic sample that demonstrates how to use RenderScript intrinsics. |
| 34 | Creates several RenderScript intrinsics and shows a filtering result with various parameters. |
| 35 | Also shows how to extends RadioButton with StateListDrawable. |
| Hak Matsuda | 1ca4f62 | 2014-01-31 16:37:51 -0800 | [diff] [blame] | 36 | ]]> |
| 37 | </intro> |
| 38 | </strings> |
| 39 | |
| 40 | <template src="base"/> |
| Hak Matsuda | 1ca4f62 | 2014-01-31 16:37:51 -0800 | [diff] [blame] | 41 | |
| Trevor Johns | 1eba6c6 | 2014-12-16 04:28:09 -0800 | [diff] [blame] | 42 | <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 Johns | 1eba6c6 | 2014-12-16 04:28:09 -0800 | [diff] [blame] | 58 | </api_refs> |
| 59 | |
| 60 | <description> |
| 61 | <![CDATA[ |
| 62 | RenderScriptIntrinsic sample that demonstrates how to use RenderScript intrinsics. |
| 63 | Creates several RenderScript intrinsics and shows a filtering result with various parameters. |
| 64 | Also shows how to extends RedioButton with StateListDrawable. |
| 65 | ]]> |
| 66 | </description> |
| 67 | |
| 68 | <intro> |
| Yuichi Araki | 39b0129 | 2016-07-08 13:54:27 +0900 | [diff] [blame] | 69 | <![CDATA[ |
| 70 | [RenderScript][1] is a framework for running computationally intensive tasks at high performance on |
| 71 | Android. RenderScript is primarily oriented for use with data-parallel computation, although serial |
| 72 | computationally intensive workloads can benefit as well. |
| Trevor Johns | 1eba6c6 | 2014-12-16 04:28:09 -0800 | [diff] [blame] | 73 | |
| 74 | RenderScript **intrinsics** are built-in functions that perform well-defined operations often seen |
| 75 | in image processing. Intrinsics provide extremely high-performance implementations of standard |
| 76 | functions with a minimal amount of code. |
| 77 | |
| 78 | This sample shows how to access and use the blur, convolve, and matrix intrinsics: |
| 79 | |
| 80 | ```java |
| 81 | mScriptBlur = ScriptIntrinsicBlur.create(mRS, Element.U8_4(mRS)); |
| 82 | mScriptConvolve = ScriptIntrinsicConvolve5x5.create(mRS, |
| 83 | Element.U8_4(mRS)); |
| 84 | mScriptMatrix = ScriptIntrinsicColorMatrix.create(mRS, |
| 85 | Element.U8_4(mRS)); |
| 86 | ``` |
| 87 | |
| Yuichi Araki | 39b0129 | 2016-07-08 13:54:27 +0900 | [diff] [blame] | 88 | RenderScript intrinsics will usually be the fastest possible way for a developer to perform these |
| 89 | operations. The Android team works closely with our partners to ensure that the intrinsics perform |
| 90 | as fast as possible on their architectures — often far beyond anything that can be achieved in a |
| 91 | general-purpose language. |
| Trevor Johns | 1eba6c6 | 2014-12-16 04:28:09 -0800 | [diff] [blame] | 92 | |
| 93 | [1]: http://developer.android.com/guide/topics/renderscript/compute.html |
| 94 | ]]> |
| 95 | </intro> |
| 96 | </metadata> |
| Hak Matsuda | 1ca4f62 | 2014-01-31 16:37:51 -0800 | [diff] [blame] | 97 | </sample> |