summaryrefslogtreecommitdiff
path: root/libs/hwui/RenderNode.cpp
AgeCommit message (Collapse)Author
2020-05-01Revert^2 "hwui: remove FatVector"Jagadeesh Pakaravoor
Revert submission 10449863-revert-fatvector Reason for revert: b/149254345 Original change (of introducing FatVector) was reverted as a stop-gap solution to fix the aforementioned bug. The bug was caused by an ABI lock between Surface's definition (that changed with Region) and lib-imsvt prebuilt. Enabling this change now as we have re-compiled the prebuilt with the change enabled. Doing that via a revert of the revert. Reverted Changes: I8ac66acb8:Revert "hwui: remove FatVector" Ib60dbf3ef:Revert "libui: rewrite Region with FatVector" Original changes: I09dc2fddd:hwui: remove FatVector I265c6c831:libui: rewrite Region with FatVector bug: 149254345 Change-Id: I9fb5e8908434abb9a763992e922445a2dc37e865
2020-03-05Revert "hwui: remove FatVector"Tim Murray
Revert "libui: rewrite Region with FatVector" Revert submission 10248126-fatvector-region Reason for revert: b/149254345 Reverted Changes: I09dc2fddd:hwui: remove FatVector I265c6c831:libui: rewrite Region with FatVector also fix wrong license in FatVector.h Test: boots Bug: 149254345 Change-Id: I8ac66acb8b635324051edd41c5d4092c223157ff
2020-02-07hwui: remove FatVectorTim Murray
FatVector now lives in fw/native/libs/ui. Test: builds, boots, works Bug: 149096186 Change-Id: I09dc2fddd2a238ef47d7853b64b0bfbf74d3f71f
2019-10-09Improve dumping of display list memory usageJohn Reck
The first step of improving is measuring. So measure better. Bug: 138856108 Test: dump Change-Id: I076b904a1f0dfb209622c76bcb8778a10cd2b7db
2019-07-29Isolate the graphics classes into their own static libDerek Sollenberger
Update additional headers to include-what-you-use to resolve compiler errors related to moving include paths. Test: CtsUiRenderingTestCases Change-Id: I230408a53610ad1926f9e46d5aff66f52fec4a3a
2019-06-26Enable RenderNode and RecordingCanvas for layoutlibFedor Kudasov
Bug: 117921091 Test: all tests should pass Change-Id: I574b12a5f7a6a54cbbcb17c35a3884368fd404e6
2019-06-24Remove redundant headerFedor Kudasov
Bug: 117921091 Test: all tests should pass Change-Id: I6a3ddd9b5f24bc3ed4d7862493c0c72e79b4410d
2019-06-12Fix setPositionListener race conditionJohn Reck
Fixes: 131625115 Test: atest android.view.cts.SystemGestureExclusionRectsTest android.view.cts.SurfaceViewSyncTest android.uirendering.cts.testclasses.SurfaceViewTests Change-Id: Ia357ff6fa5d5fe1e152abc23bbd6d8051cfd7aa7
2019-03-07Fix damage tracking for RenderNode drawn twiceJohn Reck
Bug: 127866048 Test: CustomRenderer demo Change-Id: I431a7284b1d0a026e06500a78f41830a268235a5
2018-12-14New WebViewFunctor APIJohn Reck
Should function alongside existing functor API. Bug: 120997728 Test: hwuiunit passes Change-Id: I8f6143d0be1111431b55016f34de319f6b8c8910
2018-12-05Fix skp on 32-bitJohn Reck
%d strikes again... Test: dumped skp on 32bit app Change-Id: Ica4d9e3939d0e726beb80fbf45a938b004b5eb5d
2018-11-29Add a unique ID to rendernodeJohn Reck
Bug: 120089776 Test: dump'd skp, verified ID present Change-Id: I97a03804ebc53925e1b79db3dd616a728eff0bfa
2018-10-02Auto-dark NinePatches & launcherJohn Reck
Support palette for ninepatches (fixes popupwindow) Crude heuristic tweak to treat any RenderNode that fully contains other nodes as background nodes. Test: all apps is now readable, and so is chrome's menu Change-Id: I9926973c0be1dbf0088fa2d61e4ee2a414b19a97
2018-09-24Merge "Create plumbing for disabling force-dark"TreeHugger Robot
2018-09-24Create plumbing for disabling force-darkJohn Reck
Test: sysui's rounded corners are no longer white Bug: 102591313 Change-Id: Id99ae38c354cef06b94a5fb79b5b1a9a216a514c
2018-09-21Merge changes Ie9436715,Ib3054822Derek Sollenberger
* changes: Refactor RenderState and remove unused functionality. Fix crash when EGLSurface is no longer valid.
2018-09-20Make auto-dark a bit betterJohn Reck
Handles transform of basic bitmaps Tweak to always treat text as foreground Test: builds, poked around with force_dark Change-Id: I733d39e05067438335da5a7eac06111f66f1228d
2018-09-20Refactor RenderState and remove unused functionality.Derek Sollenberger
Test: hwui_unit_tests still pass Change-Id: Ie943671535ab8c5da1bac05985e815e0cb842dc1
2018-08-29New DisplayList v2John Reck
First step of many * Pulls SkLiteDL and SkLiteRecorder into HWUI * forceDark shifted to be a sync-time transformation instead of record time. No meaningful behavior change, but much more flexible heuristics are possible this way. Test: build, poked around with forceDark on Change-Id: I7b7cec5b7fd7c2b18823b4d92d821cf5898f9b88
2018-05-09remove unneeded RecordedOpsMike Reed
Test: make Change-Id: Ifcb0df64ad649623ae875462f55d9009a4e1ac03
2018-05-04remove BakedOps and much of renderstateMike Reed
Test: make Change-Id: If070b7436b848c6840abfac5f051b0f5b6cb17ce
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-04-12Remove Properties::isSkiaPipeline (3/!?)John Reck
Test: hwuiunit & CtsUiRenderingTestCases pass Change-Id: Ie7b336eacdd1b8660e09653c64eb6ea0a7b4a258
2018-04-09Remove dead codeJohn Reck
Remove an old protobuf serialization experiement, skp capture does this better Test: builds Change-Id: Icd875eabee6b517729f901841e48e579d0e8de4d
2018-03-28Better error reporting for createOrUpdateLayerStan Iliev
Pass error handler down to the pipeline object, which allows skia pipelines to print cache memory usage. In case of an error, print arguments that were used to invoke SkSurface::MakeRenderTarget. Test: Ran android build on a device Bug: 76115654 Change-Id: I5baddfa66debd505eddc3117cf94aa6ae69bedaa
2017-11-03Format the world (or just HWUI)John Reck
Test: No code changes, just ran through clang-format Change-Id: Id23aa4ec7eebc0446fe3a30260f33e7fd455bb8c
2017-08-30Avoid performing the pathOp for clipped shadows if possible.Derek Sollenberger
Bug: 64487466 Test: SystemUiJankTests#testRecentAppsFling Change-Id: I2ca96bd6adba299cd31e12f005b2529c559740d2
2017-08-02Add check that layer size <= maxTextureSizeJohn Reck
Ensure that RenderNode fitsOnLayer() is true before assigning it a layer. Bug: 63814070 Test: repro steps in bug no longer crash Change-Id: I28bb2cb173a5efde24e2384f2606fea85b394ac8
2017-02-09Implement "dump displaylist" button for skia pipelinesStan Iliev
Implement "dump displaylist" button in hierarchyviewer for skia pipelines. Test: ran hierarchyviewer for all pipelines. bug: 34819877 Change-Id: Ifeb578260f636cb67268f9f9259e7318bf7de453
2017-01-30Switch how destroyHardwareResources worksJohn Reck
destroyHardwareResources will now only force-destroy the specific node it was called on, which are only ever the root nodes. Rely on onRemovedFromTree() to clean up resources for all other nodes. Bug: 34736819 Test: RenderNode.multiTreeValidity passes, manually verified fixes b/34736819 Change-Id: I1c275ad6a98b63bf50f265602f09bffe3e1f169b
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-11-29Add overdraw debugging feature to Skia pipelinesMatt Sarett
Test: Compared to OpenGL pipeline and sanity checked with understanding of the drawing pipeline. Also wrote a unit test. BUG:32370375 Change-Id: Iab397d21f0def725fa89551d48c764c67fd2bda8
2016-10-05Initial refactoring to enable the addition of the SkiaOpenGLPipeline.Derek Sollenberger
Test: existing and new HWUI unit tests all pass. Change-Id: I4f5c1dc839a2ed15d8b0f6245fe030684501b083
2016-10-03Move Layer creation/deletion into the RenderPipeline.Derek Sollenberger
Test: refactoring. existing tests still pass. Change-Id: I032c33896a0cb74c91e2a913a584373518466b88
2016-08-09HWUI: reimplement rendernode ouput for single streamsergeyv
bug: 26565102 Change-Id: I90b449b2dce52683c50b48091354104d76a5e44a
2016-08-03Ensure layer update include the dirty rect from AVD am: b51b2864e8 am: ↵Doris Liu
c0dccb9597 am: 334d32137f Change-Id: I20bf02209a269d6bef3085ae07caade7680b065d
2016-08-02Ensure layer update include the dirty rect from AVDDoris Liu
BUG: 30166063 Change-Id: Ia14a2fe3c653e0172a28b4ef22f5171ccf7390c1
2016-07-26Remove LayerRenderer.Derek Sollenberger
There is only one caller each for the static functions here so this CL moves the logic to the caller. Also by moving some of the code into the pipeline it makes it easier for future changes to configure how a pipeline handles a layer. Change-Id: Ib735b5154325cbb658fd151f7a19dbf434ab44b7
2016-07-12Merge \\"Avoid throwing when 0 size layer requested\\" into nyc-mr1-dev am: ↵Chris Craik
272b827925 am: ec83bd15c8 Change-Id: If585ade667c888d2f5f8e90a76125971178a7ba5
2016-07-11Avoid throwing when 0 size layer requestedChris Craik
bug:30032790 Change-Id: I8553af0d0b0d59fea6535d03479c4e7134a9f4f9
2016-07-07Delete old rendering pipelineChris Craik
fixes: 30002246 Change-Id: I45df0e924708526cee045b14c291bd23aa1a92db
2016-06-17Move SurfaceView offscreen if the app stops drawing itJohn Reck
Bug: 29360411 Change-Id: Iefb9d7a9dafb34a2b4f79130a2a8b5a7cf7de906
2016-06-13Chcek for valid render content before damaging RenderNode for dirty VDDoris Liu
BUG: 29320878 Change-Id: I847d76467bad92c956a4bb7617627983d64e90f9
2016-06-10Merge \"Fix framebuffer incomplete errors\" into nyc-devChris Craik
am: 4bcf66030d Change-Id: If578de7d7ea10cceb0e19eb68e305432e4177d04
2016-06-09Fix framebuffer incomplete errorsChris Craik
bug:29127615 Primarily fixes case where 0 dimensioned layers could be created/updated. Additionally, adds more logging in incomplete framebuffer cases, if they still occur. Change-Id: Ib90dbbafd6905aca3c8f46e64064e13a308f713d
2016-06-09Handle hidden RT VectorDrawable animatorsDoris Liu
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: Iaad1ed09cfd526276b95db0dd695275c28e074e8
2016-04-15Add a callback for when a gl functor is releasedJohn Reck
Bug: 27709981 Change-Id: Id5be3e8f88d6d84a9c59c7ed23e7e8862feefbe8
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
2016-04-04Make AVD thread safeDoris Liu
This CL introduces staging properties to VectorDrawable, which holds properties coming from UI thread. When staging properties are changed, they are marked dirty, and the staging properties then get pushed to RenderThread at sync point. In cases where no staging property has been changed, at sync point we sync the render thread properties back to staging properties to reflect the latest render thread animation value change. Also, update Vector Drawable bitmap only when it's dirty Bug: 27343970 Bug: 27385912 Bug: 27263667 Bug: 27927674 Bug: 27774383 Change-Id: Ia864f5400a53a08dbfb284fae581fb1aac4fff87
2016-03-31Add a callback for rendernode parentcount=0John Reck
Bug: 27709981 Fixes: 22565656 Change-Id: I1cb4461baf9069dc4e7ca6de10d5862578c107f4