diff options
author | Jamie Gennis <jgennis@google.com> | 2011-01-27 17:57:13 -0800 |
---|---|---|
committer | Jamie Gennis <jgennis@google.com> | 2011-01-27 17:57:13 -0800 |
commit | 37cec0fc50760fe89614863eded14011f9412534 (patch) | |
tree | 130a47414e132109b3b0d39c4b189693f8d0fd9c /graphics/java | |
parent | a9f27fa631ab21d52c75842ccaacc1cbcd75fca0 (diff) | |
download | frameworks_base-37cec0fc50760fe89614863eded14011f9412534.zip frameworks_base-37cec0fc50760fe89614863eded14011f9412534.tar.gz frameworks_base-37cec0fc50760fe89614863eded14011f9412534.tar.bz2 |
Add docs about threading to SurfaceTexture.
This is a docs-only change.
Bug: 3362397
Change-Id: I5fad19a8ae112af73b1e235cf3d54bd2179d165a
Diffstat (limited to 'graphics/java')
-rw-r--r-- | graphics/java/android/graphics/SurfaceTexture.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/graphics/java/android/graphics/SurfaceTexture.java b/graphics/java/android/graphics/SurfaceTexture.java index 64c209a..4c659d4 100644 --- a/graphics/java/android/graphics/SurfaceTexture.java +++ b/graphics/java/android/graphics/SurfaceTexture.java @@ -24,9 +24,9 @@ import android.os.Message; /** * Captures frames from an image stream as an OpenGL ES texture. * - * <p>The image stream may come from either video playback or camera preview. A SurfaceTexture may - * be used in place of a SurfaceHolder when specifying the output destination of a MediaPlayer or - * Camera object. This will cause all the frames from that image stream to be sent to the + * <p>The image stream may come from either camera preview. A SurfaceTexture may be used in place + * of a SurfaceHolder when specifying the output destination of a {@link android.hardware.Camera} + * object. Doing so will cause all the frames from the image stream to be sent to the * SurfaceTexture object rather than to the device's display. When {@link #updateTexImage} is * called, the contents of the texture object specified when the SurfaceTexture was created is * updated to contain the most recent image from the image stream. This may cause some frames of @@ -34,6 +34,11 @@ import android.os.Message; * * <p>The texture object uses the GL_TEXTURE_EXTERNAL_OES texture target, which is defined by the * OES_EGL_image_external OpenGL ES extension. This limits how the texture may be used. + * + * <p>SurfaceTexture objects may be created on any thread. {@link #updateTexImage} may only be + * called on the thread with the OpenGL ES context that contains the texture object. The + * frame-available callback is called on an arbitrary thread, so unless special care is taken {@link + * #updateTexImage} should not be called directly from the callback. */ public class SurfaceTexture { |