Hak Matsuda | 19b8151 | 2014-01-27 17:50:20 -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 | |
| 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 Nash | 9b3abfd | 2015-05-09 13:16:44 -0700 | [diff] [blame] | 26 | <minSdk>16</minSdk> |
Hak Matsuda | 19b8151 | 2014-01-27 17:50:20 -0800 | [diff] [blame] | 27 | |
| 28 | <dependency_external>'renderscript-v8.jar'</dependency_external> |
| 29 | |
| 30 | <defaultConfig> |
| 31 | renderscriptTargetApi 18 |
Trevor Johns | 492618f | 2014-12-04 18:53:13 -0800 | [diff] [blame] | 32 | renderscriptSupportModeEnabled true |
Hak Matsuda | 19b8151 | 2014-01-27 17:50:20 -0800 | [diff] [blame] | 33 | </defaultConfig> |
| 34 | |
| 35 | <strings> |
| 36 | <intro> |
| 37 | <![CDATA[ |
Trevor Johns | ec8b185 | 2014-12-12 00:59:51 -0800 | [diff] [blame] | 38 | 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 Hagikura | cd87842 | 2015-02-19 11:03:50 +0900 | [diff] [blame] | 40 | adjustment, running the computation on the device\'s GPU or other compute hardware as deemed appropriate by the system. |
Hak Matsuda | 19b8151 | 2014-01-27 17:50:20 -0800 | [diff] [blame] | 41 | ]]> |
| 42 | </intro> |
| 43 | </strings> |
| 44 | |
| 45 | <template src="base"/> |
| 46 | <common src="media"/> |
| 47 | |
Trevor Johns | ec8b185 | 2014-12-12 00:59:51 -0800 | [diff] [blame] | 48 | <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[ |
| 66 | This sample demonstrates using RenderScript to perform basic image manipulation. Specifically, it allows users |
| 67 | to dynamically adjust the saturation for an image using a slider. A custom RenderScript kernel performs the saturation |
Takeshi Hagikura | cd87842 | 2015-02-19 11:03:50 +0900 | [diff] [blame] | 68 | adjustment, running the computation on the device\'s GPU or other compute hardware as deemed appropriate by the system. |
Trevor Johns | ec8b185 | 2014-12-12 00:59:51 -0800 | [diff] [blame] | 69 | ]]> |
| 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 |
| 75 | primarily oriented for use with data-parallel computation, although serial computationally intensive workloads can |
| 76 | benefit as well. |
| 77 | |
| 78 | The RenderScript runtime will parallelize work across all processors available on a device, such as multi-core CPUs, |
| 79 | GPUs, or DSPs, allowing you to focus on expressing algorithms rather than scheduling work or load balancing. |
| 80 | RenderScript is especially useful for applications performing image processing, computational photography, or computer |
| 81 | vision. |
| 82 | |
| 83 | This sample demonstrates the fundamentals of writing a RenderScript compute kernel, and using it to perform basic image |
| 84 | manipulation. In this case, each pixel is transformed based on a liner interpolation between its original |
| 85 | RGB 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 Matsuda | 19b8151 | 2014-01-27 17:50:20 -0800 | [diff] [blame] | 92 | </sample> |