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 | |
| 23 | <!-- change minSdk if needed--> |
Max Nash | 9b3abfd | 2015-05-09 13:16:44 -0700 | [diff] [blame^] | 24 | <minSdk>13</minSdk> |
Hak Matsuda | 1ca4f62 | 2014-01-31 16:37:51 -0800 | [diff] [blame] | 25 | |
| 26 | <dependency_external>'renderscript-v8.jar'</dependency_external> |
| 27 | |
| 28 | <defaultConfig> |
| 29 | renderscriptTargetApi 18 |
Trevor Johns | 492618f | 2014-12-04 18:53:13 -0800 | [diff] [blame] | 30 | renderscriptSupportModeEnabled true |
Hak Matsuda | 1ca4f62 | 2014-01-31 16:37:51 -0800 | [diff] [blame] | 31 | </defaultConfig> |
| 32 | |
| 33 | <strings> |
| 34 | <intro> |
| 35 | <![CDATA[ |
| 36 | RenderScriptIntrinsic sample that demonstrates how to use RenderScript intrinsics. |
| 37 | Creates several RenderScript intrinsics and shows a filtering result with various parameters. |
| 38 | Also shows how to extends RedioButton with StateListDrawable. |
| 39 | ]]> |
| 40 | </intro> |
| 41 | </strings> |
| 42 | |
| 43 | <template src="base"/> |
| 44 | <common src="logger"/> |
| 45 | |
Trevor Johns | 1eba6c6 | 2014-12-16 04:28:09 -0800 | [diff] [blame] | 46 | <metadata> |
| 47 | <status>PUBLISHED</status> |
| 48 | <categories>RenderScript</categories> |
| 49 | <technologies>Android</technologies> |
| 50 | <languages>Java</languages> |
| 51 | <solutions>Mobile</solutions> |
| 52 | <level>EXPERT</level> |
| 53 | <icon>screenshots/icon-web.png</icon> |
| 54 | <screenshots> |
| 55 | <img>screenshots/main.png</img> |
| 56 | </screenshots> |
| 57 | <api_refs> |
| 58 | <android>android.renderscript.RenderScript</android> |
| 59 | <android>android.renderscript.ScriptIntrinsicBlur</android> |
| 60 | <android>android.renderscript.ScriptIntrinsicConvolve5x5</android> |
| 61 | <android>android.renderscript.ScriptIntrinsicColorMatrix</android> |
| 62 | <android></android> |
| 63 | </api_refs> |
| 64 | |
| 65 | <description> |
| 66 | <![CDATA[ |
| 67 | RenderScriptIntrinsic sample that demonstrates how to use RenderScript intrinsics. |
| 68 | Creates several RenderScript intrinsics and shows a filtering result with various parameters. |
| 69 | Also shows how to extends RedioButton with StateListDrawable. |
| 70 | ]]> |
| 71 | </description> |
| 72 | |
| 73 | <intro> |
| 74 | <![CDATA[ |
| 75 | [RenderScript][1] is a framework for running computationally intensive tasks at high performance on Android. RenderScript is |
| 76 | primarily oriented for use with data-parallel computation, although serial computationally intensive workloads can |
| 77 | benefit as well. |
| 78 | |
| 79 | RenderScript **intrinsics** are built-in functions that perform well-defined operations often seen |
| 80 | in image processing. Intrinsics provide extremely high-performance implementations of standard |
| 81 | functions with a minimal amount of code. |
| 82 | |
| 83 | This sample shows how to access and use the blur, convolve, and matrix intrinsics: |
| 84 | |
| 85 | ```java |
| 86 | mScriptBlur = ScriptIntrinsicBlur.create(mRS, Element.U8_4(mRS)); |
| 87 | mScriptConvolve = ScriptIntrinsicConvolve5x5.create(mRS, |
| 88 | Element.U8_4(mRS)); |
| 89 | mScriptMatrix = ScriptIntrinsicColorMatrix.create(mRS, |
| 90 | Element.U8_4(mRS)); |
| 91 | ``` |
| 92 | |
| 93 | RenderScript intrinsics will usually be the fastest possible way for a developer to perform these operations. The |
| 94 | Android team works closely with our partners to ensure that the intrinsics perform as fast as possible on their |
| 95 | architectures — often far beyond anything that can be achieved in a general-purpose language. |
| 96 | |
| 97 | [1]: http://developer.android.com/guide/topics/renderscript/compute.html |
| 98 | ]]> |
| 99 | </intro> |
| 100 | </metadata> |
Hak Matsuda | 1ca4f62 | 2014-01-31 16:37:51 -0800 | [diff] [blame] | 101 | </sample> |