History log of /frameworks/base/core/java/android/view/TextureView.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
52b307ebc86e12e368694442eb8751e7e0de239e 08-Oct-2012 Romain Guy <romainguy@google.com> Clear draw flags when updating TextureView's layer
Bug #7171323

Finally!

Change-Id: Iefef8fb9a8ef1fe4b374005067145319312c57cf
/frameworks/base/core/java/android/view/TextureView.java
88801b270f693ffd4125534724f204135f592f72 05-Oct-2012 Romain Guy <romainguy@google.com> Update TextureView's layer on size change
Bug #7171323

Change-Id: I24bedd7775ebf585ffcbd43b661e9c961f380c29
/frameworks/base/core/java/android/view/TextureView.java
ef09a210dd6ea481158b7028ec2424a7f5769ed2 25-Sep-2012 Romain Guy <romainguy@google.com> Don't destroy the same texture twice
Bug #7221449

SurfaceTexture already deletes the GL texture when detachFromContext
is invoked. The newly introduced refcount would casue the Layer
object to be destroyed later and attempt to delete the GL texture
again. By the time the second cleanup occurs, the texture name
might have been reused by somebody else, resulting in erroneous
behaviors.

Change-Id: I257c589fea64b34c00f46fbfaa7732e6854a5e41
/frameworks/base/core/java/android/view/TextureView.java
d15ebf25c595b855f6978d0600218e3ea5f31e92 05-Sep-2012 Chet Haase <chet@google.com> Enable changing properties of layer paint

Previously, to draw a layered view with a changed Paint object for the
drawLayer operation, you'd have to invalidate the parent view, to get the
native DisplayList to pick up the new Paint properties. This change adds
API and functionality so that the developer can call setLayerPaint(), which
does the proper invalidation (lightweight, doesn't cause redrawing the view).

Issue #6923810 Make it easy to efficiently animate a layer's Paint

Change-Id: I7fea79788d50f6d9c86dd5e5b2a4490cb95142bb
/frameworks/base/core/java/android/view/TextureView.java
dde331cebd87982faded6818ad5f9927ff994c96 03-Aug-2012 Dianne Hackborn <hackbod@google.com> We can now (kind-of) change screen density on the fly.

Preloaded drawables now have a density associated with them, so we
can load the correct drawable if we are using a different density.

Window manager now formally keeps track of the density for each
screen, allowing it to be overridden like you can already do with
size, and relies on this density to drive itself internally and
the configurations it reports.

There are a new set of Bitmap constructors where you provide a
DisplayMetrics so they can be constructed with the correct density.
(This will be for when you can have different windows in the same
app running at different densities.)

ActivityThread now watches for density changes, and pushes them
to the DENSITY_DEVICE and Bitmap global density values for that
process.

A new am command allows you to change the density.
/frameworks/base/core/java/android/view/TextureView.java
51f7c6b3620549429cd6c62e38bace43085e04fb 22-May-2012 Romain Guy <romainguy@google.com> Flip TextureView's layer after calling setSurfaceTexture()
Bug #6531172

Changing the surface texture would not update the layer properties
nor its transform matrix.

Change-Id: I54e155a410d7e72f1a8edf3a4ab0034bf764ae28
/frameworks/base/core/java/android/view/TextureView.java
52c145ff5ce34980d866155bb154913a847d955b 18-May-2012 Romain Guy <romainguy@google.com> Call invalidate() immediately when a frame is available

This change ensures that applications producing surface texture updates
at a steady rate will display the updates on screen at the same rate,
v-synced.

Change-Id: I663685b34d12809fbf8945c44851e30a2052ce74
/frameworks/base/core/java/android/view/TextureView.java
78245f77d2724ee3a053f13fbcb0359751b9f842 11-May-2012 Romain Guy <romainguy@google.com> Prevent NPE in TextureView.getBitmap()

This crash could occur when invoking setSurfaceTexture() then getBitmap()
before the View has a chance to be drawn.

Change-Id: I25c55df15750e59b9c916e8f750de2c89718d39e
/frameworks/base/core/java/android/view/TextureView.java
8a34d6800e70da45bac662873f6951c8d8295a15 18-Apr-2012 Jamie Gennis <jgennis@google.com> TextureView: don't call onSTAvailable due to setST

This change makes TextureView skip calling the onSurfaceTextureAvailable
callback when setSurfaceTexture is used to change the TextureView's
SurfaceTexture.

Change-Id: Ie08f72f157c3bfce3215076b21994026ef66d88d
/frameworks/base/core/java/android/view/TextureView.java
33efb231cb92065c40c019319adae36abc413863 14-Apr-2012 Jamie Gennis <jgennis@google.com> 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
/frameworks/base/core/java/android/view/TextureView.java
a8a2f97c100af4ba52c61c3b59c933f44a53dad4 13-Apr-2012 Romain Guy <romainguy@google.com> Don't update TextureView's surface if the Layer doesn't exist

Change-Id: Ifcc1a7a271f6c236a3aebd3726b7025348e64920
/frameworks/base/core/java/android/view/TextureView.java
1ac4765e959c79101f64b1279887ed469334c268 12-Apr-2012 Romain Guy <romainguy@google.com> Fix SurfaceTexture leak in TextureView
Bug #6318631

Change-Id: I282a7c9bb648365ba61c52a84ff510c8779130ef
/frameworks/base/core/java/android/view/TextureView.java
2af3524beb75150d347accc925022daa53b4a789 05-Apr-2012 Jamie Gennis <jgennis@google.com> TextureView: add setSurfaceTexture method

This change adds support for transferring control of a TextureView's
SurfaceTexture between the UI framework and the application. It makes the
TextureView detach the SurfaceTexture from the UI framework's GLES context
before calling the surfaceTextureDestroyed callback, allowing the app to use
the SurfaceTexture in its own GLES context if it so chooses. This change also
adds the TextureView#setSurfaceTexture method, allowing an app have the
TextureView use a SurfaceTexture that already exists rather than creating a new
one.

Change-Id: Iac9cc917687e4239dd1c24eae553709aa37512da
/frameworks/base/core/java/android/view/TextureView.java
a998dff5d49a423aaf7097aa8f96bf5bdc681d25 24-Mar-2012 Romain Guy <romainguy@google.com> Destroy the hardware renderer when ViewRootImpl's die is post-poned
Bug #6109035

ViewRootImpl.die() can be invoked in such a way that doDie() will be
executed later. On memory limited device, an eglTerminate() may happen
before doDie() is executed which leads to unstable behaviors. This
change makes sure the renderer is destroyed as soon as possible.

Change-Id: I3322410cdd744b464951e2055aeade6069d1d673
/frameworks/base/core/java/android/view/TextureView.java
7e52caf6db5feef2b847cfaa3d13690257122c3a 07-Mar-2012 Michael Jurka <mikejurka@google.com> Don't draw layers in buildLayer()

Creating the layer, if necessary, takes the bulk
of the time - just do the creation, and schedule a
deferred update

Change-Id: I21399ebd5d2929a4f242ec1c08e3f97fed1ef58a
/frameworks/base/core/java/android/view/TextureView.java
faeac2737de098269a69011f4980a412559b55a9 06-Mar-2012 Jeff Brown <jeffbrown@google.com> Merge "Change widgets to post invalidate to the animation timer."
6cb7b46c56449e84434b11eb12f9b8977fcd0398 05-Mar-2012 Jeff Brown <jeffbrown@google.com> Change widgets to post invalidate to the animation timer.

Change-Id: I8377e924529fb9d8afd8a834003a17de616e8e87
/frameworks/base/core/java/android/view/TextureView.java
2bf68f063b0077ddef6ebfe54f2ae5e063c2c229 02-Mar-2012 Romain Guy <romainguy@google.com> Deferred layer updates

Change-Id: I83d9e564fe274db658dcee9e0cc5bbf9223ebb49
/frameworks/base/core/java/android/view/TextureView.java
1766b0e25de5a66f9d0f6e73a2c342272fcadc71 22-Nov-2011 Romain Guy <romainguy@google.com> Fix the build

Change-Id: I3814c6c39eda2a4b56902e2044fbb121b4885e5d
/frameworks/base/core/java/android/view/TextureView.java
31f2c2e94656530fbf6282803e62edb47e9a894d 21-Nov-2011 Romain Guy <romainguy@google.com> Notify views when EGL resources are about to be destroyed
Bug #5639899

Change-Id: I7c5d8bebf02294426f5b3ab1358a31c38a4fd064
/frameworks/base/core/java/android/view/TextureView.java
589b0bb6ab81657ba201cbc441a49f85305170bc 10-Oct-2011 Romain Guy <romainguy@google.com> Make sure we have the correct GL context when grabbing a bitmap
Bug #5427391

Change-Id: I4687a6a3e8968fc3ca8ef171833b2bb7afc16f89
/frameworks/base/core/java/android/view/TextureView.java
59c7f80dd20258cefa1fc4bdd3c9a709a8dd53b8 30-Sep-2011 Romain Guy <romainguy@google.com> TextureView works best when it draws stuff.
Bug #5391188

Change-Id: I5e754881ccb08ff288ebd60de77282c9cbcf3f86
/frameworks/base/core/java/android/view/TextureView.java
462785fa257671fe4905d1d3e6ca27e4a61ee946 28-Sep-2011 Romain Guy <romainguy@google.com> Add a bit more doc to TextureView

Change-Id: Ib76c80d8f70ede1bb63db319bca1e93c489def4d
/frameworks/base/core/java/android/view/TextureView.java
16260e73f6c1c9dc94acf0d328a3c564426b8711 01-Sep-2011 Romain Guy <romainguy@google.com> Dispatch onDetachedFromWindow before destroying everything
Bug #5245686

Change-Id: I637178ee0bb47fbec9b59198b388bb8de22c1786
/frameworks/base/core/java/android/view/TextureView.java
c01391fb4eb0eef33d142e89e060eac7e75de39d 20-Aug-2011 Alexandre Elias <aelias@google.com> Minor fixes to SurfaceTexture transform matrix.

- Sometimes, the applyUpdate was applied through draw() and the
underlying matrix was not updated in time, causing "jitter". Add a
matrix update call in draw().

- Switch to invalidateParentIfNeeded() in setTransform().

Change-Id: I1cf9cdfe78f9d989821cdc9600984fc826430211
/frameworks/base/core/java/android/view/TextureView.java
302a9df1d50373c82923bb84ff665dfce584fb22 16-Aug-2011 Romain Guy <romainguy@google.com> Add an API to set the transform on a TextureView's surface texture.
Bug #5156689

Change-Id: I635a625885c9b832a60d44ece0de7613ceb84109
/frameworks/base/core/java/android/view/TextureView.java
402f05530352f34d5320c2d23be43c274d97c4e2 10-Aug-2011 Grace Kloba <klobag@google.com> Add a return value for SurfaceTextureListener#onSurfaceTextureDestroyed.

If returns true, the SurfaceTexture will be released by TextureView.
If returns false, the client needs to release the SurfaceTexture.

Change-Id: I946f71e337ad4170c168854ac27e028b82489c8c
/frameworks/base/core/java/android/view/TextureView.java
ec46b4e1ca89d7c3a9ad70ded58da08b5e19f08f 04-Aug-2011 Mathias Agopian <mathias@google.com> Add a 'release' method to the SurfaceTexture public Java API

Bug: 5063618
Change-Id: I689cb0c01c14e597ccfb4eb0972e64fa570bd4e8
/frameworks/base/core/java/android/view/TextureView.java
6be3d5561cbeccf0a8257a4acb155657f868e548 15-Jul-2011 Romain Guy <romainguy@google.com> Add lock/unlockCanvas to TextureView

With this change, TextureView has feature parity with SurfaceView.

Change-Id: I4ef2da33420fc9590f868636ae72a5a6de61965b
/frameworks/base/core/java/android/view/TextureView.java
80429c458506485904715180d10584092a5cd082 25-Jun-2011 Romain Guy <romainguy@google.com> Properly tear down TextureView

Change-Id: Ic23cd9257889d0abe8cc3fc1d04a66d0505e383e
/frameworks/base/core/java/android/view/TextureView.java
58f4edb7701bf20925468fa5fd1a06a461ff085b 24-Jun-2011 Romain Guy <romainguy@google.com> Reduce the number of UI events required to update a SurfaceTexture.

Change-Id: I9330c9646654fff57dcd6817c86e587a6490a9ad
/frameworks/base/core/java/android/view/TextureView.java
02ccac69fd1c0a03c24c5f3ace0ad4bed337b1fd 24-Jun-2011 Romain Guy <romainguy@google.com> Code cleanup

Change-Id: I64c346004e0adf9a776d0315534d4fe445f0c0ca
/frameworks/base/core/java/android/view/TextureView.java
cf559377b750271472aa0a717bf3b7d34abc0b39 23-Jun-2011 Grace Kloba <klobag@google.com> Add onSurfaceTextureUpdated to the TextureView listener.

The app needs a way to throttle the producer side. Expose this to enable it.

Change-Id: I04b6a3fc444117a9fc2449fb87c3c834247c8ef1
/frameworks/base/core/java/android/view/TextureView.java
1ec3a58bcdd0d5fa82cf878d974d062811933ae2 23-Jun-2011 Romain Guy <romainguy@google.com> Prevent possible NPE in TextureView

Change-Id: I539813d614c7eb1f68dad6b605cbad5b5144c5e9
/frameworks/base/core/java/android/view/TextureView.java
a9489274d67b540804aafb587a226f7c2ae4464d 23-Jun-2011 Romain Guy <romainguy@google.com> Add the ability to specify the opacity of a TextureView

TextureView assumes its content is opaque by default.

Change-Id: Iba873423566a5b67c388081838bd910dceba32ba
/frameworks/base/core/java/android/view/TextureView.java
c989d867f2580a99cde25fab0e49e445aea33f2f 22-Jun-2011 Romain Guy <romainguy@google.com> Collapse UI events in TextureView.

Change-Id: Ia6c0cef0f694edc4b685c1ade1a9ba509a51e541
/frameworks/base/core/java/android/view/TextureView.java
d6b2a00dd43257d1498b09175bff63663f6cb861 18-Jun-2011 Romain Guy <romainguy@google.com> Add error checking to LayerRenderer::copyLayer

This method is invoked by TextureView.getBitmap() and failures must be
caught to avoid leaving the GL context in a potentially bad state.

Change-Id: I620de395ba1bc20154de58c81963223dc55cac78
/frameworks/base/core/java/android/view/TextureView.java
e5e0c50f7dfaccc220725c5595080e921ffda1e4 16-Jun-2011 Romain Guy <romainguy@android.com> Properly refcount SurfaceTexture in the JNI layer.

Change-Id: I4b4c8020c13b8d6ce0d302fe42410033bf5785a6
/frameworks/base/core/java/android/view/TextureView.java
77a811610f99e21da7f88dafef60d09f345d0506 15-Jun-2011 Romain Guy <romainguy@google.com> Add TextureView.getBitmap()

This API can be used to get a Bitmap copy of the content of a
TextureView.

Change-Id: I07522216c353720fba5cab333174f58f484eb911
/frameworks/base/core/java/android/view/TextureView.java
451ce44a18e4c48f8a43aa250957f76967a35d31 11-Jun-2011 Romain Guy <romainguy@google.com> Add onSurfaceTextureDestroyed() callback.

This is needed for Renderscript and it also makes implementations
of TextureView cleaner. This change also hooks up the onSurfaceTextureSizeCHanged()
callback whenever the view size changes.

Change-Id: I2f972ee4504d800329defefacf32cf20547d31a3
/frameworks/base/core/java/android/view/TextureView.java
8f0095cd33558e9cc8a440047908e53b68906f5f 03-May-2011 Romain Guy <romainguy@google.com> Allows to render with an OpenGL context inside a TextureView.

Change-Id: I59453f7fc3997f0502a1c5d325d37fed376fabc7
/frameworks/base/core/java/android/view/TextureView.java
e208fc2f5b5bf44e418ea24336317174c9ff7ec5 29-Apr-2011 Romain Guy <romainguy@google.com> Fix the build.

Change-Id: Ia6768ea01b3885504adb65bb9795daf68cee01e6
/frameworks/base/core/java/android/view/TextureView.java
aa6c24c21c727a196451332448d4e3b11a80be69 29-Apr-2011 Romain Guy <romainguy@google.com> New widget: TextureView
Bug #4343984

TextureView can be used to render media content (video, OpenGL,
RenderScript) inside a View.

The key difference with SurfaceView is that TextureView does
not create a new Surface. This gives the ability to seamlessly
transform, animate, fade, etc. a TextureView, which was hard
if not impossible to do with a SurfaceView.
A TextureView also interacts perfectly with ScrollView,
ListView, etc. It allows application to embed media content
in a much more flexible way than before.

For instance, to render the camera preview at 50% opacity,
all you need to do is the following:

mTextureView.setAlpha(0.5f);
Camera c = Camera.open();
c.setPreviewTexture(mTextureView.getSurfaceTexture());
c.startPreview();

TextureView uses a SurfaceTexture to get the job done. More
APIs are required to make it easy to create OpenGL contexts
for a TextureView. It can currently be done with a bit of
JNI code.

Change-Id: Iaa7953097ab5beb8437bcbbfa03b2df5b7f80cd7
/frameworks/base/core/java/android/view/TextureView.java