summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/DrawFrameTask.h
AgeCommit message (Collapse)Author
2022-03-15Merge SP2A.220305.013Haamed Gheibi
Bug: 220074017 Change-Id: Idfdd94e902f656ac65a2a75dfdd199f6f85ba472
2021-07-22Switch HWUI to use native performance hint APIBo Liu
Test: None Bug: 194204196 Change-Id: I80dfdb5d56921c465406cc4534e82738c668d46d
2021-05-08Ignore blocked-on-sf time for ADPFBo Liu
Subtract out time spent blocked in dequeueBuffer. Also subtract out any time UI spents waiting on render thread while render thread is blocked dequeueBuffer, though this calculation is fairly crude. Test: Checked bouncyball returns reasonable-ish numbers even when HWUI is ahead of surface flinger Bug: 187556381 Change-Id: I368c446d93990ff8b7b645e30509405ba799c79c
2021-04-10Integrate HWUI with PerformanceHintManagerBo Liu
PerformanceHintManager.Session is in java, so add JNI and a HintSessionWrapper class in HardwareRenderer. Then pass the two calls as two std::functions into DrawFrameTask. Note Session is created per HardwareRenderer, not global (per RenderThread). Session includes UI thread, render thread, and the thread pool. Desired duration is from the intended start duration to the frame deadline. Add an actual frame start time to compute Add system properties: debug.hwui.use_hint_manager to enable PerformanceHintManager debug.hwui.target_cpu_time_percent to control percentage of frame time to be used for target cpu duration. Test: Manual test that there are no crashes and values make sense. Bug: 158791282 Change-Id: I83f25433c10daa20033803fb7c4ae45eab34f1d3
2018-05-31Attempting to fix the black flickerJohn Reck
Bug: 79231206 Test: Repro steps from bug Change-Id: I4c2810c42a7a4358f64584da3ab0cdf1499e71b6
2018-05-03Delete a bunch of codeJohn Reck
This removes the duality of DisplayList, removing a small amount of overhead Test: buids & hwuiunit passes Change-Id: I8bb3a20e9ead1caec4b4a8a3e9f2c08f717a7096
2018-02-26[Magnifier-26] Wire up frame callback for realsiesMihai Popa
Test: none yet Bug: 73810478 Bug: 72041926 Change-Id: I7154ed4b3d2cd820dc8c8ff55eed130be87d1606
2017-11-03Format the world (or just HWUI)John Reck
Test: No code changes, just ran through clang-format Change-Id: Id23aa4ec7eebc0446fe3a30260f33e7fd455bb8c
2017-10-27Switch to a fancy new queueJohn Reck
Test: unit tests & benchmarks pass/faster Change-Id: I9521432172d6dd6039c5280b1265479a36a86247
2017-09-08Fix flicker from multiwindow resizeJohn Reck
Move content bounds into DrawFrameTask. This ensures that changes in bounds are synchronized with changes in rendering commands, avoiding potential underdraw. Bug: 64200212 Test: Repro steps in bug. Drag up/down on resize handle, verify no flicker. Change-Id: I3109acf262e23c2a7d8904f1dcbfc8273aaed65b
2017-01-25Overhaul RenderNode's DisplayList managementJohn Reck
* 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
2016-04-18Don't reuse LOST_SURFACE for stoppedJohn Reck
Fixes: 28218991 If a draw() happens while we are stopped, don't report that the surface is lost because this will prompt a tear-down of the surface which isn't desired. It can result in ViewRootImpl ending up in an internally-bad state in this case. Change-Id: If3eb8c6bc8702299e5330bc0917952624dce3b7e
2016-04-07Fix some edge casesJohn Reck
Bug: 27709981 This desperately needs a refactor, but to keep the current (really needed & nice) behavior of dispatching after sync finishes would be difficult to handle cleanly without lots of ripping so... #yolo Change-Id: I831a06c6ae7412a062720d68ecbe3085190f0258
2015-10-16Rename DisplayListData to DisplayListChris Craik
Change-Id: I25f6bb88ffdf9baf7e8e4e2a294aa8c9d2a4605b
2015-09-21MultiThreaded rendering of different renderNodesSkuhne
This is adding the renderer side infrastructure to allow rendering multiple render nodes with different threads. This is a pre-step for decoupling a non client decor resize reder from a content resize render. Multiple render nodes can be added to be drawn, and to prevent overdrawing, a content bounds area can be set Bug: 22527834 Change-Id: Ie7271e20895bf38957e5a84aeefc883e282039ad
2015-07-06Adjust for pipeline stallsJohn Reck
Bug: 20853441 Calculating duration that crosses the UI-RT sync point will now subtract out the time spent waiting in queue under the assumption that this time will be accounted for in the previous frame's metrics Change-Id: Ia8213f4410638840613f5ae439e98dfb77532a6a
2015-03-11Cleanups & simplificationsJohn Reck
Change-Id: I5ad5e3b8fe55b1528f2e20c63e5abe51d9e40ff1
2015-02-20Initial attempt at jank-tracking stat collectionJohn Reck
Is a bit naive, perhaps overly aggressive, but sorta works Change-Id: I01a774e00dbe681439c02557d9728ae43c45ce50
2015-01-05Add overrides and switch to nullptr keyword for all filesChris Craik
Adds remaining missing overrides and nullptr usages, missed due to an extreme failure in tool usage. Change-Id: I56abd72975a3999ad13330003c348db40f59aebf
2014-11-07Have an actual fallback if the surface is lostJohn Reck
Bug: 17516789 This will force a relayout/reinitialize pass if the Surface is lost mid-render instead of crashing on the next frame Change-Id: If08bfa16f740728fa7c05904fa11e26f07b81e2e
2014-06-24Fix contants; RT-enable WebView pt2John Reck
Bug: 15838537 * Fix kSync_UIRedrawRequired constant value (woops) * Tell CanvasContext that WebView is now rt-safe Change-Id: Idf15cf21115c2ca24b8ccd00025e8502864cd87c
2014-06-04Even FASTER damage calculations!John Reck
* 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
2014-05-30Re-jigger layersJohn Reck
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
2014-05-29Enable debug stuffsJohn Reck
Bug: 14596762 * dumpsys gfxinfo implemented * profile GPU visual_bars implemented Change-Id: Icb948a9d5af5989b5615504d0d76ade64b93ef5b
2014-05-23Bag of scheduling tweaksJohn Reck
Bug: 15118640 * Prevent over-stuffing the queue by dropping frames * Prevent double-drawing in one pulse by RT by deferring vsync registration until post-draw so that it catches the next vsync pulse instead of the current one * Bias vsync race condition towards the UI thread * Fix queueDelay to actually work Change-Id: Ibf584258bd93ebcbba058bd976dc8b307f1c6155
2014-05-05Make RenderNodeAnimator and WebView play niceJohn Reck
Change-Id: Ifaefcf510b2d377663fc86f60608d6ec9be8329a
2014-05-05TIME LORD!John Reck
Bug: 14444180 Change-Id: I68bec3807c4d1c88d5af1aec2fe6907d60b5f2f3
2014-04-29RenderThread animator supportJohn Reck
Change-Id: Icf29098edfdaf7ed550bbe9d49e9eaefb4167084
2014-04-10Remove sync flushJohn Reck
Bug: 13952590 It was attempting to flush state changes after the canvas was destroyed, which caused layer updates to crash. Due to the removal of SetDisplayListData, the sync mode isn't able to do anything ever, so remove it. Change-Id: I1e18ce288d81fd47cc6e612afda9476f75ecef2e
2014-04-09Merge hasFunctors & pushStaging into prepareTreeJohn Reck
Bug: 13902607 Fixes synchronous mode for WebView in HardwareLayers Change-Id: I90de1e26dcfd9b75cc2f03bac72705fc23237b68
2014-04-09Switch DisplayListData to a staging modelJohn Reck
Bug: 13912977 Change-Id: I5b2f664e797be22a58300964f57ceb4fab60528c
2014-04-07Refcount RenderNodeJohn Reck
Change-Id: I7a86db8acc2b78ef33d987a43a119f5933d7d752
2014-03-27Async drawing!John Reck
Change-Id: I7e728356f58af88174328a8c0b90d27b128bfe01