summaryrefslogtreecommitdiff
path: root/libs/hwui/RenderNode.cpp
AgeCommit message (Collapse)Author
2021-09-09Fix aggressive caching of RenderNode snapshotNader 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-07-01Disable Webview Overlay when invisibleHuihong Luo
Remove Webview overlays when Webview node is set to invisible Bug: 187292989 Test: play a video in a Webview, toggle visibility for the view, check existence of a surface control named as "Webview Overlay SurfaceControl#0" Change-Id: If47a78a8ae1f7b65b9e7ab983ec72f580d78191a
2021-06-17Improve snapshot clearing consistencyNader 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-22Use TraceUtils.h from gui shared library.rnlee
Test: It makes Bug: 183120308 Change-Id: I331262dd2da59817031f0c708f4c102041dcb5e0
2021-05-17Add support to toggle different shaderNader Jawad
behaviors Updated HWUI to toggle overscroll stretch implementation based on whether the device supports high end graphics or not Bug: 187718492 Test: manual Change-Id: I13a91a8861c07bec8af43268ba22d0f5b7060b4f
2021-05-11Add some more scenes, replace linear with uniformJohn Reck
Test: this Bug: 187718492 Change-Id: I171b5c15cd18645c2da1cffffa9635f83f8877e6
2021-05-10Add a linear variant of the stretch effectJohn Reck
Supports SurfaceViews & everything Test: setprop debug.hwui.stretch_mode 1 Bug: 187718492 Change-Id: I9a222fa4c1a40e80a74cdaf75becb9524cbeed9b
2021-05-03Update hole punch logic in HWUINader 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 SurfaceViewNader Jawad
Update RenderNodeDrawable to hole punch areas into layers created for SurfaceView Bug: 184297961 Test: Added CTS test to SurfaceViewTests Change-Id: I1f03a4fe34c5a8b7411ebe728ea3d4195fcd1fac
2021-02-17Wire up SurfaceView stretch effectJohn Reck
Bug: 179047472 Test: StretchySurfaceViewActivity Change-Id: I7f3d582cc66fb732a557e9332edc6d186db2335c
2021-01-14Convert DisplayList to a value-type wrapperJohn 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 layerJohn 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-12-09Add initial benchmarks for CanvasOpJohn Reck
Also some minor other tweaks Test: this Change-Id: Idb8a5955839893ff000de87d4899fd130ede061c
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