summaryrefslogtreecommitdiff
path: root/libs/hwui/RenderNode.h
AgeCommit message (Collapse)Author
2024-09-03fix(force invert): hide Container type treatment behind feature flag Tyler Freeman
Bug: 364172907 Change-Id: If92a59ae84e395f64267980baeba5d7ceaef7e39 Test: nope Flag: EXEMPT bugfix
2024-01-23Merge "Fix the problem that mDamageGenerationId is a random value" into main ↵ Treehugger Robot
am: 7165268319 am: 6f85a7a688 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2921305 Change-Id: I9eca6dd2e750edd96bcad080fe5838441f70c3aa Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-22Fix the problem that mDamageGenerationId is a random value qiubowen
1. mDamageGenerationId is a random value when initialized. When this random value happens to be equal to info.damageGenerationId, the dirty range will reach the maximum DIRTY_MAX. 2. When info.damageGenerationId is equal to 0, which is when the first frame of the APP is drawn, there is no need to reach the maximum DIRTY_MAX in the dirty range. Bug: 321612817 Test: build Change-Id: Iab6a04170926d10cdf2a62ae0fbf9cbe5eeb8bbf Signed-off-by: qiubowen <qiubowen@xiaomi.com>
2023-11-07fix(force invert): don't let devs opt-out of force dark when force invert is on Tyler Freeman
Bug: 282821643 Test: manual?? Change-Id: I0a3907ede2ad5d0c895ae70d3d1ec47b0902e3b4
2023-09-06Merge "Migrate String8|16.setTo to assignment operator" into main am: ↵ Tomasz Wasilczyk
c01e3ba035 am: 1ca55b9eb9 am: 6fd58092f6 am: af3d4530d8 am: 4dc0449864 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2724077 Change-Id: I6ba4c4df589ed3851d1ac677b7078cac7015b6fa Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-06Merge "Migrate String8|16.setTo to assignment operator" into main am: c01e3ba035 Tomasz Wasilczyk
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2724077 Change-Id: I4b4032ff4145ac6aa328723dd73151e1e7a021a5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-05Migrate String8|16.setTo to assignment operator Tomasz Wasilczyk
Bug: 295394788 Test: make checkbuild Change-Id: I370f66c469de73064dec2e42c539dc236dd69d1e
2023-08-25Merge Android U (ab/10368041) Xin Li
Bug: 291102124 Merged-In: I3c9e9d15786fbead1b874636b46844f6c24bccc2 Change-Id: Id6cf6cc13baef4e67486c6271a1510146204affa
2023-08-17Use String8/16 c_str [graphics] Tomasz Wasilczyk
Bug: 295394788 Test: make checkbuild Change-Id: I605c6c25c2415bdb4996715f270ee8be9e9d1a23 Merged-In: I605c6c25c2415bdb4996715f270ee8be9e9d1a23
2023-08-17Use String8/16 c_str [graphics] Tomasz Wasilczyk
Bug: 295394788 Test: make checkbuild Change-Id: I605c6c25c2415bdb4996715f270ee8be9e9d1a23
2023-08-17Add TextureView list to dumpsys gfxinfo John Reck
Test: dumpsys gfxinfo looking at a textureview Change-Id: I57bffad773ef62bfd96998341c5f050c6a87ebde
2023-05-09hwui: send TextureView hint to SF Ady Abraham
So that SF could use this hint when choosing the refresh rate. SF would only try to heuristically calculate the frame rate of a layer when TextureView is updating. This fixes a bug where SF tries to heuristically calculate the frame rate for UI animations but fails due to long frames. Bug: 280249265 Test: Playing a video on Facebook and observe refresh rate Test: go/cb-pcmark Change-Id: I0d54d62b97ff48583fbe3cc0da188fe85810fd5e
2022-04-21Remove unused include of SkCamera Kevin Lubick
RenderNode.h does not appear to reference any symbol defined in SkCamera Change-Id: I186a631142836a728b4261e458ab42c45fab40c1
2021-09-09Fix aggressive caching of RenderNode snapshot Nader Jawad
Updated ImageFilter caching logic to update the snapshot whenever the surface generation ID has changed. Fixes: 199242895 Test: Added test to RenderNodeTests Change-Id: I803dce35ba15a098f14dc02a479abf8b2fbae51f
2021-09-09Fix aggressive caching of RenderNode snapshot Nader Jawad
Updated ImageFilter caching logic to update the snapshot whenever the surface generation ID has changed. Fixes: 199242895 Test: Added test to RenderNodeTests Change-Id: I803dce35ba15a098f14dc02a479abf8b2fbae51f
2021-06-23Fix: Release skia resources when RenderNode layer is configured Nader Jawad
-Updated StretchEffect to null out the child texture of the SkRuntimeEffectBuilder after the shader is created -Release optional mask surface used for stretching the hole punch -Release SkRuntimeEffectBuilder instance on RenderNode's StretchEffect Fixes: 183592264 Test: manual + re-ran cts tests Change-Id: I90952666d7489985de9ce798ab792cf3fd7f6087
2021-06-17Improve snapshot clearing consistency Nader Jawad
Updated snapshot result to clear the internal SkImage whenever the layer changes. The previous logic did not clear out the snapshot in various use cases. Because the implementation before relied on the snapshot created with SkSurface this makes the cleanup logic consistent with SkImages created with SkImage::makeWithFilter Bug: 188450217 Test: manual testing of discord app Change-Id: I6391eb3b49794e54705bf5c6a09d2bdfd0564d05
2021-06-10Refactor SkImageFilter usage to cache results. Nader Jawad
If an SkImageFilter is used, create an image snapshot with the filter applied to avoid re-computing it on each draw invocation Bug: 188450217 Test: Re-ran CTS tests Change-Id: Ib790669e14ada9d4ebbfac958d699e2b5242f2d7
2021-05-03Update hole punch logic in HWUI Nader Jawad
--Updated HWUI holepunch logic for SurfaceView to also apply the stretch to the hole punch --Updated RenderNode callbacks to also include an offset from the ancestor RenderNode that also has a stretch configured on it --Added new test activity to verify hole punch logic Bug: 179047472 Test: manual Change-Id: Ibbaf8248a31839ba9dc352ecb9fef54e1276918e
2021-04-06Holepunch layers for SurfaceView Nader Jawad
Update RenderNodeDrawable to hole punch areas into layers created for SurfaceView Bug: 184297961 Test: Added CTS test to SurfaceViewTests Change-Id: I1f03a4fe34c5a8b7411ebe728ea3d4195fcd1fac
2021-01-14Convert DisplayList to a value-type wrapper John Reck
Make DisplayList its own type instead of an alias, pushing the Skia aspect behind it mostly. Removes a bunch of manual memory management and opens the door to DisplayList being a union type with multiple implementations Test: builds (somehow), boots, hwuiunit passes, CtsUiRendering passes Change-Id: I1d7806aa3afc5d9ece08b06959920078a5814c59
2021-01-12Avoid DisplayList* hitting the JNI layer John Reck
Keep the actual display list type internal to HWUI/native avoids requiring that the recording type fits in a jlong aka, opens up a usage of value types here instead Test: boots Change-Id: Idf5a4acc7dbcb61e6742a6bf6369bd351f595be4
2020-05-02Merge "Revert^2 "hwui: remove FatVector"" into rvc-dev am: 21b6e912c2 am: ↵ Dheeraj Shetty
efe501a989 am: 2d83890dc0 am: 745cfdc765 Change-Id: I1ed19bdd3f7312ecdb14f741ed7491083944fc78
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-04-09Remove unecessary exported symbols from libhwui.so Derek Sollenberger
Test: compiles and links Bug: 150782769 Change-Id: Ib49c1bf914b6bfaad1fb29371115df7c9eec08d2
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 FatVector Tim 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 usage John Reck
The first step of improving is measuring. So measure better. Bug: 138856108 Test: dump Change-Id: I076b904a1f0dfb209622c76bcb8778a10cd2b7db
2019-06-12Fix setPositionListener race condition John 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 twice John Reck
Bug: 127866048 Test: CustomRenderer demo Change-Id: I431a7284b1d0a026e06500a78f41830a268235a5
2018-11-29Add a unique ID to rendernode John Reck
Bug: 120089776 Test: dump'd skp, verified ID present Change-Id: I97a03804ebc53925e1b79db3dd616a728eff0bfa
2018-10-02Auto-dark NinePatches & launcher John 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-20Make auto-dark a bit better John Reck
Handles transform of basic bitmaps Tweak to always treat text as foreground Test: builds, poked around with force_dark Change-Id: I733d39e05067438335da5a7eac06111f66f1228d
2018-08-29New DisplayList v2 John 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-07-09Auto-dark mode prototype John Reck
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
2018-05-30Remove dead code John Reck
Test: builds Change-Id: I57cf72ca460115463d7759097d5ba598b5ec1775
2018-05-03Delete a bunch of code John Reck
This removes the duality of DisplayList, removing a small amount of overhead Test: buids & hwuiunit passes Change-Id: I8bb3a20e9ead1caec4b4a8a3e9f2c08f717a7096
2018-04-09Remove dead code John Reck
Remove an old protobuf serialization experiement, skp capture does this better Test: builds Change-Id: Icd875eabee6b517729f901841e48e579d0e8de4d
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-02-09Implement "dump displaylist" button for skia pipelines Stan 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 works John 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 management John 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-03Implement Skia pipelines for OpenGL and Vulkan. Stan Iliev
Implement Skia pipelines for OpenGL and Vulkan: base SkiaPipeline, SkiaOpenGLPipeline and SkiaVulkanPipeline. Write unit tests for SkiaPipeline. Test: Built and run manually on angler-eng. Change-Id: Ie02583426cb3547541ad9bf91700602a6163ff58
2016-10-31Implement SkiaRecordingCanvas, RenderNodeDrawable and other drawables. Stan Iliev
Implement SkiaRecordingCanvas, RenderNodeDrawable, GLFunctorDrawable, LayerDrawable, StartReorderBarrierDrawable, EndReorderBarrierDrawable. Move AnimatedRoundRect and AnimatedCircle in a separate file. All Skia pipeline files are moved in hwui/pipeline/skia folder. Add unit tests for RenderNodeDrawable, StartReorderBarrierDrawable, EndReorderBarrierDrawable and SkiaRecordingCanvas. Test: I tested manually on 6P devices and did run the unit tests. Change-Id: If2a347bd1fc4689953822294ce5bf98c7f3f57c7
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 stream sergeyv
bug: 26565102 Change-Id: I90b449b2dce52683c50b48091354104d76a5e44a
2016-07-07Delete old rendering pipeline Chris Craik
fixes: 30002246 Change-Id: I45df0e924708526cee045b14c291bd23aa1a92db
2016-06-28Merge \"Fix SurfaceViewPositionListener race bugs\" into nyc-mr1-dev John Reck
am: 8701bff9ba Change-Id: I17b1cf4e81321edb04ae9ac99449160a705ba824