summaryrefslogtreecommitdiff
path: root/core/java/android/view/HardwareLayer.java
Commit message (Collapse)AuthorAgeFilesLines
* Rename HardwareLayer -> TextureLayerJohn Reck2018-02-211-153/+0
| | | | | | | | Update name to reflect meaning/usage Change-Id: Iddb3621cbca147f96faa83380867baa49c382aab Fixes: 20461288 Test: builds & boots
* DeferredLayerUpdater: clean up Layer lifecyclesergeyv2017-02-131-3/+2
| | | | | | Test: refactoring CL, all existent tests should pass bug:34919311 Change-Id: Ib2889667a5ab8a2aaba443458782bc163467f0ea
* Clean up setLayerType and setLayerPaintsergeyv2016-03-241-2/+3
| | | | | bug:21755299 Change-Id: I8f0953ccfc3d743abdecc8ec228ed3e1b6718c3c
* Nuke HardwareRenderer abstract baseJohn Reck2015-12-021-3/+3
| | | | | | Bug: 17303292 Change-Id: I4a272ea4f695f4f9993e8be640fdd8530b691be0
* Revert "Revert "Simplify TextureView draw path""Chris Craik2015-08-211-4/+0
| | | | | | | | Fixed build breakage This reverts commit d35dcb13115ca1dd8c07e397f43a186cd7fd1a01. Change-Id: Id3a103fbaac15a05f558bce2161ce17b6e8d2ea3
* Revert "Simplify TextureView draw path"Bart Sears2015-08-201-0/+4
| | | | | | This reverts commit 20a248934c67b19c8734362dba76a5cc94254686. Change-Id: Iaa3ebb1d868acbe184080087aec312b43e87e3c7
* Simplify TextureView draw pathChris Craik2015-08-191-4/+0
| | | | | | bug:20461288 Change-Id: I239fbd26ab2177481c84feb62a1da68faeb634ac
* resolve merge conflicts of cabf8a7 to master.John Reck2014-11-071-3/+2
|\ | | | | | | Change-Id: If0ca1c37d05f5dc471d88a3bf158dd68a1880bbf
| * Fix wrong-thread issueJohn Reck2014-11-071-3/+2
| | | | | | | | | | | | Bug: 18259560 Change-Id: Ic63a86efba9c86f21defac0695a73db8b09ae284
* | Mutable Java Shaders with Immutable Native ShadersDerek Sollenberger2014-10-061-1/+1
|/ | | | | bug: 17641888 Change-Id: I0f05387423cde185dab1a1453f89d5251ca1a4f9
* More cleanupsJohn Reck2014-06-271-21/+2
| | | | Change-Id: Id5967944b949a2aec57e4fe9fdcdc04c11b8c35a
* Move LayerType to RenderNodeJohn Reck2014-06-121-47/+2
| | | | Change-Id: Icb79a5015cb0362b1f3a66d09007450730135a97
* Even FASTER damage calculations!John Reck2014-06-041-2/+0
| | | | | | | | | | | * Now with more native! * Less matrix math thanks to bulk-property-update support! * Zero JNI on the View.damageInParent() path! * Fully aware of RT-driven animators! * Likely full of new and exciting bugs! * But it also fixes at least 1 existing invalidate bug! Change-Id: Ie0773f85a60850ff2668370c58defef2e8aa079f
* Remove GLRendererJohn Reck2014-06-021-37/+0
| | | | Change-Id: I180286417c1a354fc7eb1eadb1884ac6add0795c
* Re-jigger layersJohn Reck2014-05-301-76/+29
| | | | | | | | | | | | | | | | Bug: 15185239 Bug: 15238382 Make DeferredLayerUpdater ref counted so that HardwareLayer:finalizer() works non-crashily on leaked layers Give DeferredLayerUpdater the ability to have a layer destroyer set so that leaked layers can still be recycled on the RenderThread Order layer updates based off of pushLayerUpdate() calls to fix issue with nested layers Change-Id: I4449cee607f7e5126e02fed7464cf48038e3dfdf
* Rename DisplayList->RenderNodeJohn Reck2014-03-171-3/+3
| | | | Change-Id: Idcca6f26ba6282594789962f5edb3ed53a290fef
* DisplayList lifecycle changesJohn Reck2014-03-101-1/+1
| | | | | | | | | | | Bug: 13360343 Change DisplayList to be more forgiving with weaker lifecycle requirements. Is more self-managed with a strong reference to the renderer it needs Also fix naming mismatch Change-Id: I5c89453a72a52954f6f959f0846199705dbb6476
* DisplayList overhaulJohn Reck2014-03-041-1/+1
| | | | Change-Id: I53418d580c98f706e971545cff81b9921c12cc5f
* Reapply "Refactor setting an SkPaint onto a hwui Layer."Derek Sollenberger2014-02-201-3/+2
| | | | | | This reverts commit 90d0c75e94a32fb7d993fae69762820aabc2fcbb. Change-Id: Ie807761231edf7c848b019931dccbf466208c0be
* Support HardwareLayers in RenderThreadJohn Reck2014-02-191-6/+26
| | | | | | Also has a few HardwareLayer lifecycle fixes Change-Id: I6308cb05f8f199eed72189ace768013a46815941
* Revert "Refactor setting an SkPaint onto a hwui Layer."Derek Sollenberger2014-02-121-2/+3
| | | | | | This reverts commit e889298cd6ae1fc0d76bc00d7d12586db03eb261. Change-Id: I4b1d609b2d4280595d40cb10d6c18875c22999f8
* Refactor setting an SkPaint onto a hwui Layer.Derek Sollenberger2014-02-121-3/+2
| | | | | | | This CL removes the unecessary JNI call to set the colorFilter on a layer. Change-Id: I9e088f888938d4315745aa618334bfdb9e61343a
* Refactor HardwareLayerJohn Reck2014-02-101-132/+196
| | | | | | | Defer all the things! Groundwork to allow hardware layers to work in a renderthread world Change-Id: Ib3aa47525f393083621254a743dbaa6352f933bd
* Add an on-screen overdraw counterRomain Guy2013-05-031-2/+10
| | | | | | | | | The counter can be enabled by setting the system property called debug.hwui.overdraw to the string "count". If the string is set to "show", overdraw will be highlighted on screen instead of printing out a simple counter. Change-Id: I9a9c970d54bffab43138bbb7682f6c04bc2c40bd
* Expose display list APIsRomain Guy2013-02-191-3/+8
| | | | | | | The exposed APIs are slightly simpler than the full APIs used internally. Only APIs useful to applications are exposed. Change-Id: Ie03014628d40ad5ef63dedbc52ce3def84429d54
* Don't destroy the same texture twiceRomain Guy2012-09-251-0/+5
| | | | | | | | | | | | | 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
* Update layers in a single batch at the beginning of a frameRomain Guy2012-09-211-1/+1
| | | | | | Bug #7186819 Change-Id: Ice5926dfedfb3be3a3064e65008dafa2852407da
* Fix occasional crash bug with layersChet Haase2012-09-171-1/+2
| | | | | | | | | | | | | | | | | | | | Launcher occasionally crashes with a stack trace indicating that the memory of a Layer object is corrupt. It is possible for us to delete a Layer structure and then, briefly, use it to draw a DisplayList again before that DisplayList gets recreated (without the layer that got deleted). When this happens, if the memory got corrupted, it's possible to crash. The fix is to add Layer to the other objects which we currently refcount (bitmaps, shaders, etc.). Then instead of deleting a Layer, we decrement the refcount. We increment when creating it, then increment it again when it's referenced from a DisplayList. Then we decrement the refcount instead of deleting it, and decrement when we clear a DisplayList that refers to it. Then when the refcount reaches 0, we delete it. Issue #6994632 Native crash in launcher when trying to launch all apps screen Change-Id: I0627be8d49bb2f9ba8d158a84b764bb4e7df934c
* Enable changing properties of layer paintChet Haase2012-09-071-0/+9
| | | | | | | | | | | | 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
* It seems that apparently useless public APIs are actually usefulRomain Guy2012-08-081-2/+5
| | | | | | Bug #6953651 Change-Id: Ic47ce504e63262711f5d3edc76f7d2b9c12471ad
* Cleanup of libhwuiRomain Guy2012-08-071-5/+2
| | | | Change-Id: Ib7f5771548462c00027a8ad57badfb68c50644f9
* Remove unused View.flushLayer() APIRomain Guy2012-07-111-5/+0
| | | | Change-Id: I5d4c7388afb5265964ab6b769cc0abfee9745c84
* Update layers' opaque property when neededRomain Guy2012-07-111-0/+7
| | | | | | | | Before this change, changing a View's opacity would not be reflected by hardware layers. This could cause layers to retain their previous opacity. Change-Id: Iba2c8b4242deca021651df9324cc7c585a64653d
* Handle view properties at the native levelChet Haase2012-03-121-0/+19
| | | | | | | | | | | Basic functionality of handling View properties (transforms, left/right/top/bottom, and alpha) at the native DisplayList level. This logic is disabled for now (via compile-time flags in View.java and DisplayListRenderer.h) as we continue work on it (there is no advantage to the new approach until we optimize invalidation and rendering paths to use the new code path). Change-Id: I370c8d21fbd291be415f55515ab8dced6f6d51a3
* Don't draw layers in buildLayer()Michael Jurka2012-03-061-1/+1
| | | | | | | | Creating the layer, if necessary, takes the bulk of the time - just do the creation, and schedule a deferred update Change-Id: I21399ebd5d2929a4f242ec1c08e3f97fed1ef58a
* Deferred layer updatesRomain Guy2012-03-021-0/+10
| | | | Change-Id: I83d9e564fe274db658dcee9e0cc5bbf9223ebb49
* Discard framebuffer rendering queues when discarding layersRomain Guy2011-12-061-0/+5
| | | | | | Bug #5581817 Change-Id: Ie30700a29059d2ea60eb7bd3f8bd20ac48a149ab
* Revert "Discard framebuffer rendering queues when discarding layers"Dave Burke2011-11-141-5/+0
| | | | This reverts commit da96f8ac2c1c35a54f3f36e6d776cb386a251d03.
* Discard framebuffer rendering queues when discarding layersRomain Guy2011-11-101-0/+5
| | | | | | Bug #5581817 Change-Id: If612846ec5f7793710fc4df152791fb32c506551
* Add an API to set the transform on a TextureView's surface texture.Romain Guy2011-08-161-0/+8
| | | | | | Bug #5156689 Change-Id: I635a625885c9b832a60d44ece0de7613ceb84109
* Code cleanupRomain Guy2011-06-241-2/+28
| | | | Change-Id: I64c346004e0adf9a776d0315534d4fe445f0c0ca
* New widget: TextureViewRomain Guy2011-04-281-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Better backend for hardware layers.Romain Guy2011-01-111-0/+115
With this new backend, a hardware layer is only recreated when its associated view is udpated. This offers fast composition in GL and fast update of the layer in GL as well. Change-Id: I97c43a612f5955c6bf1c192c8ca4af10fdf1d076