Skip to content

Commit 816b776

Browse files
Romain GuyAndroid (Google) Code Review
authored andcommitted
Merge "Add a bit more doc to TextureView"
2 parents fd9932d + 462785f commit 816b776

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

core/java/android/view/TextureView.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@
9393
* been invoked.) It is therefore highly recommended you use a listener to
9494
* be notified when the SurfaceTexture becomes available.</p>
9595
*
96+
* <p>It is important to note that only one producer can use the TextureView.
97+
* For instance, if you use a TextureView to display the camera preview, you
98+
* cannot use {@link #lockCanvas()} to draw onto the TextureView at the same
99+
* time.</p>
100+
*
96101
* @see SurfaceView
97102
* @see SurfaceTexture
98103
*/
@@ -523,6 +528,10 @@ public boolean isAvailable() {
523528
* rectangle is specified, in which case, non-dirty pixels will be
524529
* preserved.</p>
525530
*
531+
* <p>This method can only be used if the underlying surface is not already
532+
* owned by another producer. For instance, if the TextureView is being used
533+
* to render the camera's preview you cannot invoke this method.</p>
534+
*
526535
* @return A Canvas used to draw into the surface.
527536
*
528537
* @see #lockCanvas(android.graphics.Rect)

0 commit comments

Comments
 (0)