diff options
author | Tim Murray <timmurray@google.com> | 2013-04-09 11:01:01 -0700 |
---|---|---|
committer | Tim Murray <timmurray@google.com> | 2013-06-05 11:28:45 -0700 |
commit | c11e25c4e653124def1fb18e203b894f42106cbe (patch) | |
tree | 56827889775e5d4cf96f5fa2946ecf5484f3f540 /graphics/java/android/renderscript/Sampler.java | |
parent | aafed1df0404e2fb64c1adeb127dc7f300a2c07b (diff) |
Improve RS documentation.
bug 8570568
Change-Id: I465fcc8ec3e2cc892dc3cb0067aacf5224338102
Diffstat (limited to 'graphics/java/android/renderscript/Sampler.java')
-rw-r--r-- | graphics/java/android/renderscript/Sampler.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/graphics/java/android/renderscript/Sampler.java b/graphics/java/android/renderscript/Sampler.java index 057e9b5452f8..623055fe7782 100644 --- a/graphics/java/android/renderscript/Sampler.java +++ b/graphics/java/android/renderscript/Sampler.java @@ -28,9 +28,14 @@ import android.graphics.Bitmap; import android.graphics.BitmapFactory; /** - * Sampler object which defines how data is extracted from textures. Samplers - * are attached to Program objects (currently only ProgramFragment) when those objects - * need to access texture data. + * Sampler object that defines how Allocations can be read as textures within a + * kernel. Samplers are used in conjunction with the {@code rsSample} runtime + * function to return values from normalized coordinates. + * + * Any Allocation used with a Sampler must have been created with {@link + * android.renderscript.Allocation#USAGE_GRAPHICS_TEXTURE}; using a Sampler on + * an {@link android.renderscript.Allocation} that was not created with {@link + * android.renderscript.Allocation#USAGE_GRAPHICS_TEXTURE} is undefined. **/ public class Sampler extends BaseObj { public enum Value { @@ -275,9 +280,8 @@ public class Sampler extends BaseObj { } /** - * Builder for creating non-standard samplers. Usefull if mix and match of - * wrap modes is necesary or if anisotropic filtering is desired. - * + * Builder for creating non-standard samplers. This is only necessary if + * a Sampler with different min and mag modes is desired. */ public static class Builder { RenderScript mRS; |