Loading core/java/android/view/Surface.java +12 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,18 @@ import dalvik.system.CloseGuard; /** * Handle onto a raw buffer that is being managed by the screen compositor. * * <p>A Surface is generally created by or from a consumer of image buffers (such as a * {@link android.graphics.SurfaceTexture}, {@link android.media.MediaRecorder}, or * {@link android.renderscript.Allocation}), and is handed to some kind of producer (such as * {@link android.opengl.EGL14#eglCreateWindowSurface(android.opengl.EGLDisplay,android.opengl.EGLConfig,java.lang.Object,int[],int) OpenGL}, * {@link android.media.MediaPlayer#setSurface MediaPlayer}, or * {@link android.hardware.camera2.CameraDevice#createCaptureSession CameraDevice}) to draw * into.</p> * * <p><strong>Note:</strong> A Surface acts like a * {@link java.lang.ref.WeakReference weak reference} to the consumer it is associated with. By * itself it will not keep its parent consumer from being reclaimed.</p> */ public class Surface implements Parcelable { private static final String TAG = "Surface"; Loading media/java/android/media/ImageReader.java +4 −0 Original line number Diff line number Diff line Loading @@ -241,6 +241,10 @@ public class ImageReader implements AutoCloseable { * same {@link Surface} can be reused with a different API once the first source is * disconnected from the {@link Surface}.</p> * * <p>Please note that holding on to the Surface object returned by this method is not enough * to keep its parent ImageReader from being reclaimed. In that sense, a Surface acts like a * {@link java.lang.ref.WeakReference weak reference} to the ImageReader that provides it.</p> * * @return A {@link Surface} to use for a drawing target for various APIs. */ public Surface getSurface() { Loading Loading
core/java/android/view/Surface.java +12 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,18 @@ import dalvik.system.CloseGuard; /** * Handle onto a raw buffer that is being managed by the screen compositor. * * <p>A Surface is generally created by or from a consumer of image buffers (such as a * {@link android.graphics.SurfaceTexture}, {@link android.media.MediaRecorder}, or * {@link android.renderscript.Allocation}), and is handed to some kind of producer (such as * {@link android.opengl.EGL14#eglCreateWindowSurface(android.opengl.EGLDisplay,android.opengl.EGLConfig,java.lang.Object,int[],int) OpenGL}, * {@link android.media.MediaPlayer#setSurface MediaPlayer}, or * {@link android.hardware.camera2.CameraDevice#createCaptureSession CameraDevice}) to draw * into.</p> * * <p><strong>Note:</strong> A Surface acts like a * {@link java.lang.ref.WeakReference weak reference} to the consumer it is associated with. By * itself it will not keep its parent consumer from being reclaimed.</p> */ public class Surface implements Parcelable { private static final String TAG = "Surface"; Loading
media/java/android/media/ImageReader.java +4 −0 Original line number Diff line number Diff line Loading @@ -241,6 +241,10 @@ public class ImageReader implements AutoCloseable { * same {@link Surface} can be reused with a different API once the first source is * disconnected from the {@link Surface}.</p> * * <p>Please note that holding on to the Surface object returned by this method is not enough * to keep its parent ImageReader from being reclaimed. In that sense, a Surface acts like a * {@link java.lang.ref.WeakReference weak reference} to the ImageReader that provides it.</p> * * @return A {@link Surface} to use for a drawing target for various APIs. */ public Surface getSurface() { Loading