Skip to content

Commit 33efb23

Browse files
author
Jamie Gennis
committed
Unhide new SurfaceTexture & TextureView APIs
This change unhides the new SurfaceTexture and TextureView APIs that were added to allow transferring ownership of the SurfaceTexture from the UI framework to the application. Change-Id: Ic4b781d907a59e99ff1a5974009305c1f9aee36a
1 parent dbed083 commit 33efb23

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

api/current.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9003,6 +9003,8 @@ package android.graphics {
90039003

90049004
public class SurfaceTexture {
90059005
ctor public SurfaceTexture(int);
9006+
method public void attachToGLContext(int);
9007+
method public void detachFromGLContext();
90069008
method public long getTimestamp();
90079009
method public void getTransformMatrix(float[]);
90089010
method public void release();
@@ -23289,6 +23291,7 @@ package android.view {
2328923291
method public android.graphics.Canvas lockCanvas(android.graphics.Rect);
2329023292
method protected final void onDraw(android.graphics.Canvas);
2329123293
method public void setOpaque(boolean);
23294+
method public void setSurfaceTexture(android.graphics.SurfaceTexture);
2329223295
method public void setSurfaceTextureListener(android.view.TextureView.SurfaceTextureListener);
2329323296
method public void setTransform(android.graphics.Matrix);
2329423297
method public void unlockCanvasAndPost(android.graphics.Canvas);

core/java/android/view/TextureView.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,6 @@ public SurfaceTexture getSurfaceTexture() {
676676
*
677677
* @param surfaceTexture The {@link SurfaceTexture} that the view should use.
678678
* @see SurfaceTexture#detachFromGLContext()
679-
* @hide
680679
*/
681680
public void setSurfaceTexture(SurfaceTexture surfaceTexture) {
682681
if (surfaceTexture == null) {

graphics/java/android/graphics/SurfaceTexture.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public void setDefaultBufferSize(int width, int height) {
159159
* It will implicitly bind its texture to the GL_TEXTURE_EXTERNAL_OES texture target.
160160
*/
161161
public void updateTexImage() {
162-
nativeUpdateTexImage();
162+
nativeUpdateTexImage();
163163
}
164164

165165
/**
@@ -172,8 +172,6 @@ public void updateTexImage() {
172172
* This can be used to access the SurfaceTexture image contents from multiple OpenGL ES
173173
* contexts. Note, however, that the image contents are only accessible from one OpenGL ES
174174
* context at a time.
175-
*
176-
* @hide
177175
*/
178176
public void detachFromGLContext() {
179177
int err = nativeDetachFromGLContext();
@@ -194,8 +192,6 @@ public void detachFromGLContext() {
194192
*
195193
* @param texName The name of the OpenGL ES texture that will be created. This texture name
196194
* must be unusued in the OpenGL ES context that is current on the calling thread.
197-
*
198-
* @hide
199195
*/
200196
public void attachToGLContext(int texName) {
201197
int err = nativeAttachToGLContext(texName);

0 commit comments

Comments
 (0)