diff options
author | Tim Murray <timmurray@google.com> | 2013-03-27 21:31:28 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-03-27 21:31:28 +0000 |
commit | 275812c2bb09a82efd7ea8d90b57c99ff51eab0a (patch) | |
tree | 88c1ed93480d5ef5631041c1b6ee970aacb3a88e /graphics/java | |
parent | d72f932b8cbf461ebb79c249ce92b9b811122190 (diff) | |
download | frameworks_base-275812c2bb09a82efd7ea8d90b57c99ff51eab0a.zip frameworks_base-275812c2bb09a82efd7ea8d90b57c99ff51eab0a.tar.gz frameworks_base-275812c2bb09a82efd7ea8d90b57c99ff51eab0a.tar.bz2 |
Revert "Remove all public mention of RS graphics from docs."
This reverts commit d72f932b8cbf461ebb79c249ce92b9b811122190
Change-Id: I056b13d0b2beb508e4215bc0d289cf3e76a3a986
Diffstat (limited to 'graphics/java')
14 files changed, 89 insertions, 28 deletions
diff --git a/graphics/java/android/renderscript/FileA3D.java b/graphics/java/android/renderscript/FileA3D.java index 8b0222a..42b508b 100644 --- a/graphics/java/android/renderscript/FileA3D.java +++ b/graphics/java/android/renderscript/FileA3D.java @@ -28,7 +28,6 @@ import android.util.Log; import android.util.TypedValue; /** - * @hide * @deprecated in API 16 * FileA3D allows users to load Renderscript objects from files * or resources stored on disk. It could be used to load items diff --git a/graphics/java/android/renderscript/Font.java b/graphics/java/android/renderscript/Font.java index 1a8d5bf..8a49abb 100644 --- a/graphics/java/android/renderscript/Font.java +++ b/graphics/java/android/renderscript/Font.java @@ -30,9 +30,8 @@ import android.util.Log; import android.util.TypedValue; /** - * @hide * @deprecated in API 16 - * <p>This class gives users a simple way to draw hardware accelerated text. + * <p>This class gives users a simple way to draw hardware accelerated text. * Internally, the glyphs are rendered using the Freetype library and an internal cache of * rendered glyph bitmaps is maintained. Each font object represents a combination of a typeface, * and point size. You can create multiple font objects to represent styles such as bold or italic text, @@ -44,7 +43,7 @@ import android.util.TypedValue; * render large batches of text in sequence. It is also more efficient to render multiple * characters at once instead of one by one to improve draw call batching.</p> * <p>Font color and transparency are not part of the font object and you can freely modify - * them in the script to suit the user's rendering needs. Font colors work as a state machine. + * them in the script to suit the user's rendering needs. Font colors work as a state machine. * Every new call to draw text uses the last color set in the script.</p> **/ public class Font extends BaseObj { diff --git a/graphics/java/android/renderscript/Mesh.java b/graphics/java/android/renderscript/Mesh.java index d0d383d..7210513 100644 --- a/graphics/java/android/renderscript/Mesh.java +++ b/graphics/java/android/renderscript/Mesh.java @@ -21,7 +21,6 @@ import java.util.Vector; import android.util.Log; /** - * @hide * @deprecated in API 16 * <p>This class is a container for geometric data displayed with * Renderscript. Internally, a mesh is a collection of allocations that diff --git a/graphics/java/android/renderscript/Program.java b/graphics/java/android/renderscript/Program.java index 9bd103e..d9f64c6 100644 --- a/graphics/java/android/renderscript/Program.java +++ b/graphics/java/android/renderscript/Program.java @@ -26,7 +26,6 @@ import android.util.Log; /** - * @hide * * Program is a base class for all the objects that modify * various stages of the graphics pipeline diff --git a/graphics/java/android/renderscript/ProgramFragment.java b/graphics/java/android/renderscript/ProgramFragment.java index dd0f9f5..69968ac 100644 --- a/graphics/java/android/renderscript/ProgramFragment.java +++ b/graphics/java/android/renderscript/ProgramFragment.java @@ -21,7 +21,6 @@ import android.util.Log; /** - * @hide * @deprecated in API 16 * <p>The Renderscript fragment program, also known as fragment shader is responsible * for manipulating pixel data in a user defined way. It's constructed from a GLSL diff --git a/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java b/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java index 8ae1777..848c5a3 100644 --- a/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java +++ b/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java @@ -21,7 +21,6 @@ import android.util.Log; /** - * @hide * @deprecated in API 16 * <p>ProgramFragmentFixedFunction is a helper class that provides * a way to make a simple fragment shader without writing any diff --git a/graphics/java/android/renderscript/ProgramRaster.java b/graphics/java/android/renderscript/ProgramRaster.java index 216cb4e..c44521b 100644 --- a/graphics/java/android/renderscript/ProgramRaster.java +++ b/graphics/java/android/renderscript/ProgramRaster.java @@ -21,7 +21,6 @@ import android.util.Log; /** - * @hide * @deprecated in API 16 * Program raster is primarily used to specify whether point sprites are enabled and to control * the culling mode. By default, back faces are culled. diff --git a/graphics/java/android/renderscript/ProgramStore.java b/graphics/java/android/renderscript/ProgramStore.java index dac9e76..d0fd6e5 100644 --- a/graphics/java/android/renderscript/ProgramStore.java +++ b/graphics/java/android/renderscript/ProgramStore.java @@ -21,7 +21,6 @@ import android.util.Log; /** - * @hide * <p>ProgramStore contains a set of parameters that control how * the graphics hardware handles writes to the framebuffer. * It could be used to:</p> diff --git a/graphics/java/android/renderscript/ProgramVertex.java b/graphics/java/android/renderscript/ProgramVertex.java index 50e32f6..2bd5124 100644 --- a/graphics/java/android/renderscript/ProgramVertex.java +++ b/graphics/java/android/renderscript/ProgramVertex.java @@ -14,8 +14,7 @@ * limitations under the License. */ -/** - * @hide + /** * <p>The Renderscript vertex program, also known as a vertex shader, describes a stage in * the graphics pipeline responsible for manipulating geometric data in a user-defined way. * The object is constructed by providing the Renderscript system with the following data:</p> @@ -44,7 +43,6 @@ import android.util.Log; /** - * @hide * @deprecated in API 16 * ProgramVertex, also know as a vertex shader, describes a * stage in the graphics pipeline responsible for manipulating @@ -78,15 +76,14 @@ public class ProgramVertex extends Program { } /** - * @hide - * @deprecated in API 16 - * Builder class for creating ProgramVertex objects. - * The builder starts empty and the user must minimally provide - * the GLSL shader code, and the varying inputs. Constant, or - * uniform parameters to the shader may optionally be provided as - * well. - * - **/ + * @deprecated in API 16 + * Builder class for creating ProgramVertex objects. + * The builder starts empty and the user must minimally provide + * the GLSL shader code, and the varying inputs. Constant, or + * uniform parameters to the shader may optionally be provided as + * well. + * + **/ public static class Builder extends BaseProgramBuilder { /** * @deprecated in API 16 diff --git a/graphics/java/android/renderscript/ProgramVertexFixedFunction.java b/graphics/java/android/renderscript/ProgramVertexFixedFunction.java index ad486f3..88cade4 100644 --- a/graphics/java/android/renderscript/ProgramVertexFixedFunction.java +++ b/graphics/java/android/renderscript/ProgramVertexFixedFunction.java @@ -22,7 +22,6 @@ import android.util.Log; /** - * @hide * @deprecated in API 16 * ProgramVertexFixedFunction is a helper class that provides a * simple way to create a fixed function emulation vertex shader diff --git a/graphics/java/android/renderscript/RSSurfaceView.java b/graphics/java/android/renderscript/RSSurfaceView.java index 3c6c720..82ed95c 100644 --- a/graphics/java/android/renderscript/RSSurfaceView.java +++ b/graphics/java/android/renderscript/RSSurfaceView.java @@ -30,7 +30,6 @@ import android.view.SurfaceHolder; import android.view.SurfaceView; /** - * @hide * @deprecated in API 16 * The Surface View for a graphics renderscript (RenderScriptGL) to draw on. * diff --git a/graphics/java/android/renderscript/RSTextureView.java b/graphics/java/android/renderscript/RSTextureView.java index 7eeeeae..ed04000 100644 --- a/graphics/java/android/renderscript/RSTextureView.java +++ b/graphics/java/android/renderscript/RSTextureView.java @@ -29,7 +29,6 @@ import android.util.Log; import android.view.TextureView; /** - * @hide * @deprecated in API 16 * The Texture View for a graphics renderscript (RenderScriptGL) * to draw on. diff --git a/graphics/java/android/renderscript/RenderScriptGL.java b/graphics/java/android/renderscript/RenderScriptGL.java index 52034b1..5269405 100644 --- a/graphics/java/android/renderscript/RenderScriptGL.java +++ b/graphics/java/android/renderscript/RenderScriptGL.java @@ -29,7 +29,6 @@ import android.view.SurfaceHolder; import android.view.SurfaceView; /** - * @hide * @deprecated in API 16 * The Graphics derivitive of Renderscript. Extends the basic context to add a * root script which is the display window for graphical output. When the diff --git a/graphics/java/android/renderscript/package.html b/graphics/java/android/renderscript/package.html index eb178c1..5eab23c 100644 --- a/graphics/java/android/renderscript/package.html +++ b/graphics/java/android/renderscript/package.html @@ -1,10 +1,86 @@ <HTML> <BODY> -<p>RenderScript provides support for high-performance computation across heterogeneous processors.</p> +<p>The Renderscript rendering and computational APIs offer a low-level, high performance means of +carrying out mathematical calculations and 3D graphics rendering.</p> <p>For more information, see the -<a href="{@docRoot}guide/topics/renderscript/index.html">RenderScript</a> developer guide.</p> +<a href="{@docRoot}guide/topics/renderscript/index.html">Renderscript</a> developer guide.</p> {@more} +<p>An example of Renderscript in applications include the 3D carousel view that is present in +Android 3.0 applications such as the Books and YouTube applications. This API is intended for +developers who are comfortable working with native code and want to maximize their performance +critical applications.</p> + +<p>Renderscript adopts a control and slave architecture where the low-level native code is controlled by the +higher level Android system that runs in the virtual machine (VM). The VM code handles resource +allocation and lifecycle management of the Renderscript enabled application and calls the Renderscript +code through high level entry points. The Android build tools generate these entry points through reflection on +the native Renderscript code, which you write in C (C99 standard). The Renderscript code +does the intensive computation and returns the result back to the Android VM.</p> + +<p>You can find the Renderscript native +APIs in the <code><sdk_root>/platforms/android-11/renderscript</code> directory. +The Android system APIs are broken into a few main groups:</p> + +<h4>Core</h4> +<p>These classes are used internally by the system for memory allocation. They are used by the classes that +are generated by the build tools:</p> +<ul> + <li>Allocation</li> + <li>Element</li> + <li>Type</li> + <li>Script</li> +</ul> + + +<h4>Data Types</h4> +<p>These data types are used by the classes that are generated +by the build tools. They are the reflected counterparts of the native data types that +are defined by the native Renderscript APIs and used by your Renderscript code. The +classes include:</p> +<ul> + <li>Byte2, Byte3, and Byte4</li> + <li>Float2, Float3, Float4</li> + <li>Int2, Int3, Int4</li> + <li>Long2, Long3, Long4</li> + <li>Matrix2f, Matrix3f, Matrix4f</li> + <li>Short2, Short3, Short4</li> +</ul> + +<p>For example, if you declared the following struct in your .rs Renderscript file:</p> + +<pre>struct Hello { float3 position; rs_matrix4x4 transform; }</pre> + +<p>The build tools generate a class through reflection that looks like the following:</p> +<pre> +class Hello { + static public class Item { + Float4 position; + Matrix4f transform; + } +Element createElement(RenderScript rs) { + Element.Builder eb = new Element.Builder(rs); + eb.add(Element.F32_3(rs), "position"); + eb.add(Element.MATRIX_4X4(rs), "transform"); + return eb.create(); + } +} +</pre> + +<h4>Graphics</h4> +<p>These classes are specific to graphics Renderscripts and support a typical rendering +pipeline.</p> +<ul> +<li>Mesh</li> +<li>ProgramFragment</li> +<li>ProgramRaster</li> +<li>ProgramStore</li> +<li>ProgramVertex</li> +<li>RSSurfaceView</li> +<li>Sampler</li> +</ul> + +</p> </BODY> </HTML> |