From 4ea4f632da86c8462cfc49039a54836afbcae57f Mon Sep 17 00:00:00 2001
From: Sumir Kataria TextureView can only be used in a hardware accelerated window. When
* rendered in software, TextureView will draw nothing. TextureView vs. SurfaceView Capabilities
+ *
+ *
+ *
+ *
+ *
+ * TextureView
+ * SurfaceView
+ *
+ *
+ * Supports alpha
+ * X
+ *
+ *
+ *
+ * Supports rotations
+ * X
+ *
+ *
+ *
+ * Supports clipping
+ * X
+ *
+ *
+ *
+ * HDR support
+ * Limited (on Android T+)
+ * Full
+ *
+ *
+ * Renders DRM content
+ *
+ * X
+ *
Unlike {@link SurfaceView}, TextureView does not create a separate * window but behaves as a regular View. This key difference allows a * TextureView to have translucency, arbitrary rotations, and complex @@ -51,8 +88,8 @@ import android.util.Log; * hierarchy is that it may have slower performance than * SurfaceView. TextureView contents must be copied, internally, from the * underlying surface into the view displaying those contents. For - * that reason, SurfaceView is recommended as a more general solution - * to problems requiring rendering to surfaces.
+ * that reason, SurfaceView is recommended as a more general solution + * to problems requiring rendering to surfaces. * *Using a TextureView is simple: all you need to do is get its * {@link SurfaceTexture}. The {@link SurfaceTexture} can then be used to