Android S: SurfaceFlinger指Surface.java的用途

Handle onto a raw buffer that is being managed by the screen compositor.
Surface是一个句柄,该句柄是指向由屏幕合成器管理的原始缓冲。

A Surface is generally created by or from a consumer of image buffers (such as a
Surface通常被图像缓冲区的消费者创建或来自于其。
{@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.

Note: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.
注意:Surface是一个弱引用到与之管理的消费者,就其本身而言,它不会阻止父类消费者被回收。

47  /**
48   * Handle onto a raw buffer that is being managed by the screen compositor.
49   *
50   * <p>A Surface is generally created by or from a consumer of image buffers (such as a
51   * {@link android.graphics.SurfaceTexture}, {@link android.media.MediaRecorder}, or
52   * {@link android.renderscript.Allocation}), and is handed to some kind of producer (such as
53   * {@link android.opengl.EGL14#eglCreateWindowSurface(android.opengl.EGLDisplay,android.opengl.EGLConfig,java.lang.Object,int[],int) OpenGL},
54   * {@link android.media.MediaPlayer#setSurface MediaPlayer}, or
55   * {@link android.hardware.camera2.CameraDevice#createCaptureSession CameraDevice}) to draw
56   * into.</p>
57   *
58   * <p><strong>Note:</strong> A Surface acts like a
59   * {@link java.lang.ref.WeakReference weak reference} to the consumer it is associated with. By
60   * itself it will not keep its parent consumer from being reclaimed.</p>
61   */
62  public class Surface implements Parcelable {
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值