Home | History | Annotate | Download | only in BasicRenderScript
      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-->
     26     <minSdk>16</minSdk>
     27 
     28     <dependency_external>'renderscript-v8.jar'</dependency_external>
     29 
     30     <defaultConfig>
     31             renderscriptTargetApi 18
     32             renderscriptSupportModeEnabled true
     33     </defaultConfig>
     34 
     35     <strings>
     36         <intro>
     37             <![CDATA[
     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
     40             adjustment, running the computation on the device\'s GPU or other compute hardware as deemed appropriate by the system.
     41             ]]>
     42         </intro>
     43     </strings>
     44 
     45     <template src="base"/>
     46     <common src="media"/>
     47 
     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
     68 adjustment, running the computation on the device\'s GPU or other compute hardware as deemed appropriate by the system.
     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>
     92 </sample>
     93