summaryrefslogtreecommitdiff
path: root/core/java/android/view/RenderNode.java
Commit message (Collapse)AuthorAgeFilesLines
* Rename & package shuffleJohn Reck2018-10-041-1119/+0
| | | | | | | | | | Rename DisplayListCanvas -> RecordingCanvas Move RecordingCanvas to android.graphics Move RenderNode to android.graphics Bug: 112709971 Test: make & boot Change-Id: Iddeb6a89f8923ea81a1f37bbee4e9b1db8ede238
* De-couple RenderNode from View packageJohn Reck2018-09-261-17/+60
| | | | | | | First step of moving RenderNode to the graphics package Test: builds Change-Id: Ife7f5ec6698e32393d1b85ed2bad909ef0210be4
* Create plumbing for disabling force-darkJohn Reck2018-09-241-0/+30
| | | | | | | Test: sysui's rounded corners are no longer white Bug: 102591313 Change-Id: Id99ae38c354cef06b94a5fb79b5b1a9a216a514c
* Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-201-0/+12
| | | | | | | | | | | | | | | | | | | | | | For packages: android.view.textservice android.view.textclassifier.logging android.view.textclassifier android.view.inputmethod android.view.autofill android.view.accessibility android.view This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: I4147b038ed7adf0311ee9918b44766f82a057eaf
* Auto-dark mode prototypeJohn Reck2018-07-091-0/+25
| | | | | | | | | Experimental force_dark prototype mode. Enabled by setting debug.hwui.force_dark to true. Test: verified nothing changes without prop being set Change-Id: Ib02f3f1a9c591cab1f312b827451f04c782c2f41
* Tweak some RenderNode API surfacesJohn Reck2018-06-041-18/+15
| | | | | | | | | | | * no-arg #start() * remove no-op #destroy method * fix a Java-imposed quirk that you can't draw a currently invalid RenderNode, forcing bottom-up recording for no particular reason Test: builds Change-Id: I28b41c83b4f7f9ddced843b0d57e9ac510d40ae5
* Add isPivotSet/resetPivotJohn Reck2018-03-211-0/+7
| | | | | | Bug: 74825533 Test: CTS view tests in topic Change-Id: Ib918bc5830d53ee0a83b13ab53ac6e8dd86c869f
* Add API to set tonal shadow colorJohn Reck2018-01-311-4/+25
| | | | | | Bug: 68211332 Test: HwAccelerationTests's coloredshadow demo & CTS test in topic Change-Id: I09f5d1067b3200564a9d47219f70985edf3a2527
* Create colored shadows demoJohn Reck2017-11-131-0/+7
| | | | | | Test: HwAccelerationTest demo Bug: 68211332 Change-Id: Ia53a6ac2854570d0495b355bbebee1dcec2f47ba
* Overhaul RenderNode's DisplayList managementJohn Reck2017-01-251-11/+8
| | | | | | | | | | | | | | | | | * Move mValid to native * Have destroyHardwareResources destroy everything * Remove flaky mParentCount checks in setStaging * All tree updates have an internal observer to ensure onRemovedFromTree() is a reliable signal * onRemovedFromTree() immediately releases resources to avoid displaylist "leaks" Test: Unit tests for validity added & pass, manually verified that b/34072929 doesn't repro Bug: 34072929 Change-Id: I856534b4ed1b7f009fc4b7cd13209b97fa42a71c
* CriticalNative for RenderNode and DisplayListCanvasChris Craik2016-12-151-66/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 33460152 Test: adb shell am instrument -w -e class android.view.ViewShowHidePerfTest com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner - Also FastNative for setDisplayList, simplifying upcall into field setter. - Also removes depth sweep parameter for ViewShowHideTests for now, they're not providing much extra info. Together with Outline/Path CL, about 25% faster visibility toggles 960MHz Bullhead Before (prior to Outline/Path CL): $ adb shell am instrument -w -e class android.view.ViewShowHidePerfTest com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner | grep min INSTRUMENTATION_STATUS: add[Factory:NestedLinearLayoutTree,depth:6]_min=743505 INSTRUMENTATION_STATUS: goneToVisible[Factory:NestedLinearLayoutTree,depth:6]_min=332420 INSTRUMENTATION_STATUS: invisibleToVisible[Factory:NestedLinearLayoutTree,depth:6]_min=354154 INSTRUMENTATION_STATUS: recordAfterAdd[Factory:NestedLinearLayoutTree,depth:6]_min=1106095 INSTRUMENTATION_STATUS: remove[Factory:NestedLinearLayoutTree,depth:6]_min=1261290 INSTRUMENTATION_STATUS: visibleToGone[Factory:NestedLinearLayoutTree,depth:6]_min=356153 INSTRUMENTATION_STATUS: visibleToInvisible[Factory:NestedLinearLayoutTree,depth:6]_min=362149 After (this CL + Outline/Path CL): $ adb shell am instrument -w -e class android.view.ViewShowHidePerfTest com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner | grep min INSTRUMENTATION_STATUS: add[Factory:NestedLinearLayoutTree,depth:6]_min=636061 INSTRUMENTATION_STATUS: goneToVisible[Factory:NestedLinearLayoutTree,depth:6]_min=267481 INSTRUMENTATION_STATUS: invisibleToVisible[Factory:NestedLinearLayoutTree,depth:6]_min=289433 INSTRUMENTATION_STATUS: recordAfterAdd[Factory:NestedLinearLayoutTree,depth:6]_min=976827 INSTRUMENTATION_STATUS: remove[Factory:NestedLinearLayoutTree,depth:6]_min=1207286 INSTRUMENTATION_STATUS: visibleToGone[Factory:NestedLinearLayoutTree,depth:6]_min=286148 INSTRUMENTATION_STATUS: visibleToInvisible[Factory:NestedLinearLayoutTree,depth:6]_min=292834 Change-Id: Iaddfa9550bdbab807c662595d005126d98cdc277
* Switch back to NativeAllocationRegistryJohn Reck2016-11-161-15/+12
| | | | | | | | | | Bug: 32881864 Partial revert of 3acf0382da22cda88234e599cd81b1ff5441cc35 Test: none Change-Id: Ie749e0ef0a84ff820b1ea445422cf28112d62209
* Add benchmarks for View inflationJohn Reck2016-11-021-17/+30
| | | | | | | | | | | | | | | Also speed up RenderNode creation: Use finalizer() instead of NativeAllocationRegistry, this shaves ~3us off of creation currently Avoid instanceof, instead have SurfaceView explicitly ask for updates. Remove unused method call. Test: ran benchmarks Change-Id: I3117fdf72313a4e6a9965baca9f2a8b855c19b34
* Modernize RenderNode JNIJohn Reck2016-08-241-25/+81
| | | | Change-Id: I455271647f01f3ac8ceb73359a51a2d2720fdd47
* Fix wording regarding ThreadedRendererStan Iliev2016-06-281-1/+1
| | | | | | | | ThreadedRenderer is not synonymous with hardware rendering, so remove references to hardware rendering when referring to ThreadedRenderer. Change-Id: Ic66a482ccf05f556ebe6ec194ce4f858f75bbb8b
* Handle hidden RT VectorDrawable animatorsDoris Liu2016-05-261-3/+3
| | | | | | | | | | | | | | | | | | | | | This CL changes the target of VD specific animators to VectorDrawable, instead of RenderNode. The benefit of doing so is that animators can now detect whether the animation is meaningful by checking whether their VD target is in the display list. If not, that means the VD is not drawing for the current frame, in which case we can be smarter and more power efficient by removing the animator from the list and posting a delayed onFinished listener callback. By setting VD as the animation target, when an ImageView decides to update its drawable from one AVD to something else, we'll be able to detect that the previous AVD is no longer in the display list, and stop providing animation pulse to the stale AVD, which is something we couldn't do previously. This change also handles the case where one AVD instance could be drawn in two different views. Bug: 27441375 Change-Id: Id4b3b37f28274c917cb9beb9dcd3d1e6991b5c5d
* Fix how outlines are sent to rendernodeChris Craik2016-04-041-9/+13
| | | | | | | | | | | | bug:27918183 Fixes an issue where all convex outlines were pushed as empty rects to RenderNode. Also adds outline/reveal clip property logging, so such issues are easier to debug in the future. Change-Id: Ic4a996ecd09a8ef84cdf8b963bdb4853c7f6d180
* Add a callback for rendernode parentcount=0John Reck2016-03-311-1/+13
| | | | | | | Bug: 27709981 Fixes: 22565656 Change-Id: I1cb4461baf9069dc4e7ca6de10d5862578c107f4
* Clean up setLayerType and setLayerPaintsergeyv2016-03-241-1/+1
| | | | | bug:21755299 Change-Id: I8f0953ccfc3d743abdecc8ec228ed3e1b6718c3c
* Support running AVD on UI threadDoris Liu2016-02-231-1/+1
| | | | | | | | | | | By default, AVD animates on RT thread. But since in some cases there's a need for a finer control on when the frame update for the animation should happen, such as coordiating the AVD animation with other animations that run on UI thread, we are providing a way to force the AVD to run on UI thread. Bug: 27278616 Change-Id: I372ecd3dc52e3fa0bdce3a1e9c19443f9b199027
* Revert "Revert "Check RenderNode's owning view before attaching animators""Doris Liu2016-02-191-0/+4
| | | | | | This reverts commit eb40178af3b7c8d925eaf6c1aa0bef739c8ea47e. Change-Id: I6838ecb35b50847746ee66ac204f14eb5f579b91
* Revert "Check RenderNode's owning view before attaching animators"Doris Liu2016-02-181-4/+0
| | | | | | This reverts commit 12abdeb3c7bffbc7c07b913595f6ea2cb66154d1. Change-Id: I938deddf5f294127f87a0e70f940fe5b9a85e0b2
* Check RenderNode's owning view before attaching animatorsDoris Liu2016-02-161-0/+4
| | | | | | | | | -Only add animators to a RenderNode when its owning view is attached -When changing animator's target RenderNode, remove the animator from the old target RenderNode that it's currently running on, if any. Bug: 27141983 Bug: 27145149 Change-Id: I9c9592382d64ecc0390f7ec743a59ce1ad7d9798
* Revert "Revert "VectorDrawable native rendering - Step 4 of MANY""Doris Liu2016-02-041-0/+9
| | | | | | This reverts commit 5a11e8d0ba21624025b89ac63bbd18befa55be0e. Change-Id: I7a48b59c4f930dad65ddc8590c25a12636244ea2
* Revert "VectorDrawable native rendering - Step 4 of MANY"Doris Liu2016-02-041-9/+0
| | | | | | | | b/26949340 and b/26975469, b/26975079 as well This reverts commit f276acd98457bcaabc9e79a17a736b3b484f005e. Change-Id: I4b55177daf0d289bc03604c71fd4bf579f65073a
* Merge "Have RT drive window positioning"John Reck2016-02-041-0/+5
|\
| * Have RT drive window positioningJohn Reck2016-02-041-0/+5
| | | | | | | | | | | | Bug: 22802885 Change-Id: I6beed5474d3a943b16e9097f7bd61ce3cbd37505
* | VectorDrawable native rendering - Step 4 of MANYDoris Liu2016-02-021-0/+9
|/ | | | | | | | | | | | | | This CL runs VectorDrawable animation on RenderThread. The changes in this CL include: - Convert all the animators in AnimatorSet for AVD into a set of RenderNodeAnimators. - Hook up the new animators with RenderThread - Add drawOp in RecordingCanvas for drawing VD so that during the animation on RenderThread, all the property changes on VD can be reflected on the screen. TODO: - Implement reverse and reset for AVD. Change-Id: I2df1d754f2db0ad098d9c15dde4bb2bdfafc2315
* Rename DisplayListData to DisplayListChris Craik2015-10-161-5/+5
| | | | Change-Id: I25f6bb88ffdf9baf7e8e4e2a294aa8c9d2a4605b
* Remove unused functions and variables from DisplayListCanvasDerek Sollenberger2015-07-101-45/+1
| | | | | | | This also moves some functions that are only called when creating/completing a displayList into the appropriate constructors and endRecording calls. Change-Id: I9f6add156d7f476a52766934af713b0f852c8dea
* Add compat path for restore underflowChris Craik2015-04-021-6/+1
| | | | | | bug:19829784 Change-Id: Ia761664208ab80c055ca11174db3ddc74457b92b
* Remove HardwareCanvasChris Craik2015-03-101-19/+19
| | | | Change-Id: I239646a7f00f09d3f76fe6b6162eed86bc0d6e77
* Rename and simplify DisplayList Canvas classesChris Craik2015-03-091-3/+3
| | | | Change-Id: I49fd2ce02e01401209fe2a378e9f9547c7b27c61
* Mutable Java Shaders with Immutable Native ShadersDerek Sollenberger2014-10-061-1/+1
| | | | | bug: 17641888 Change-Id: I0f05387423cde185dab1a1453f89d5251ca1a4f9
* Add shadow/clipping properties to HierarchyViewerChris Craik2014-09-051-0/+5
| | | | | | bug:15777980 Change-Id: Ic3d24326f585d2d2b9889486f0ed322eb98b5af8
* Animator stuffJohn Reck2014-08-271-4/+17
| | | | | | Bug: 17228458 Change-Id: Id884a429a512f9cd2be0ed16dbd0f10e92b4440d
* Cap scales used for tessellation with minimum and maximumChris Craik2014-08-071-6/+0
| | | | | bug:15615144 Change-Id: I3e833864af3a7b34e444bd13db34b6c90496a8b6
* Add outline alphaChris Craik2014-07-311-4/+6
| | | | | | | | | | bug:16140822 bug:16566746 This allows background drawables to alter the opacity of a shadow being cast with their own alpha values. Change-Id: I49698cc7c1bf4b2b55ffe2f82899543ca62bc61c
* Use RoundRect clipping for circle reveal animationChris Craik2014-07-301-3/+3
| | | | | | | | bug:16630975 Also, remove inverse clipping feature from reveal animator. Change-Id: I770a4eb48cd123b0ca0f39d16a0f3eefd1be3653
* Throw IAE on invalid scaleJohn Reck2014-07-281-0/+6
| | | | | | Bug: 16565964 Change-Id: I0cc35c532b42433381e1ae7f350c95ecbb4d09c3
* Move ClipBounds to nativeChris Craik2014-07-251-55/+17
| | | | | | | | bug:15698973 Also simplifies RenderNode LTRB properties Change-Id: I09263a697b71d325a46b57cd5250a2b165f251c8
* Make setter methods on Outline call setEmpty() based on paramsChris Craik2014-07-221-1/+4
| | | | | | | | | | | | bug:16142564 Additionally, better define behavior around null outline providers: A view with an empty outline, and setClipToOutline=true will not be rendered, though one with a null outline provider (and thus no outline) will be. Change-Id: Ic9549841b107b2eb51b417c66058a0cd69dd89eb
* Initial replacement of setOutline() with ViewOutlineProvider APIChris Craik2014-07-011-27/+9
| | | | | | | | | | | | | bug:15283203 A View's outline is now managed by its outline provider. This means the outline is automatically requeried when needed (e.g. drawable updates or resize), with customizable querying behavior. Also adds 'isFilled' property to outline, to be used for hinting shadow overdraw avoidance. Change-Id: Ie137548fa850f1ff7863ab2f660d05145c2ad11e
* Animator refactoring & fixesJohn Reck2014-06-261-19/+0
| | | | | | | | | | | | Tweaks animators to have less unnecessary refcounting Pull animator management out into seperate class More control to tweak animator lifecycle, such as doing Java-side handling of start delay by attaching but not starting the animator Change-Id: I4ff8207580ca11fb38f45ef0007b406e0097281c
* Move LayerType to RenderNodeJohn Reck2014-06-121-5/+9
| | | | Change-Id: Icb79a5015cb0362b1f3a66d09007450730135a97
* Fix DA bugsJohn Reck2014-06-121-8/+0
| | | | | | | | | | * Now aware of transform of DrawDisplayListOp * Supports projection Bug: 15539677 Bug: 15506680 Change-Id: Ic16f482cd48c3add12e49eca529281be12b93491
* Even FASTER damage calculations!John Reck2014-06-041-0/+8
| | | | | | | | | | | * 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
* Have all the setters return changedJohn Reck2014-06-041-94/+95
| | | | Change-Id: Ie5e755058a7094bb0c2fce60ec3cef47c23823ce
* Enable debug stuffsJohn Reck2014-05-291-0/+8
| | | | | | | | Bug: 14596762 * dumpsys gfxinfo implemented * profile GPU visual_bars implemented Change-Id: Icb948a9d5af5989b5615504d0d76ade64b93ef5b
* Clean up Outline API, method on drawableChris Craik2014-05-201-3/+1
| | | | | | bug:15025466 bug:15089680 Change-Id: I8d3b64a0d9dbdbaf679042c8b384d2050323a8e6