summaryrefslogtreecommitdiff
path: root/libs/hwui/pipeline/skia
AgeCommit message (Collapse)Author
2022-03-15Merge SP2A.220305.013Haamed Gheibi
Bug: 220074017 Change-Id: Idfdd94e902f656ac65a2a75dfdd199f6f85ba472
2021-09-28Fix initialization of snapshot SkImage instanceNader Jawad
Fix issue where the initial snapshot used to create a resultant SkImage instance with an SkImageFilter applied was not initialized. Fixes: 201312688 Test: Re-ran CTS tests Change-Id: I2440a161c70076850479c562c7c9e6dc8d756236
2021-09-22Conditionally cache RenderEffect resultsNader Jawad
Added property to conditionally cache SkImage instances with SkImageFilters applied. Some GL vendor implementations invoke Fence::waitForver without signalling, leading to ANRs throughout the system. Bug: 193145089 Test: manual Change-Id: I3e478b11b66205d96e9499a362f7412a1d6e952d
2021-07-14Always submit after texture uploadsJohn Reck
Ensure GrContext::submit() is always called after either Bitmap#prepareToDraw() or if DrawFrameTask skipped drawing. In either case texture uploads & deletions will be scheduled, but without the submit they won't actually be performed. This can end up running out of RAM. Bug: 189393671 Test: manual test app Change-Id: I57477c64457558487e9e5ec0a979ad9099a8cb2c
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-30Make sure we check for valid GrContext when pinning images.Greg Daniel
Test: manual building and running. Bug: 187540936 Change-Id: Ie900d80128646c8ca2d4fce41d436019e3cf9c71
2021-06-12Merge "Refactor SkImageFilter usage to cache results." into sc-devTreeHugger Robot
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-06-11Improve picture capture debug pathJohn Reck
* Fixes hardware bitmap capture * Fixes mutable bitmap capture (no flickering) * Adds basic single-frame LRU cache to avoid repeated readbacks of GPU resources * Does up-front readback of GPU resources * Moves serialization off RenderThread again thanks to up-front readback avoiding needing GPU access off-thread * Reduces RAM usage & improves performance by serializing directly to output stream instead of first copying to a byte[] Bug: 174223722 Test: PictureCaptureDemo mirrors the content Change-Id: If7ec208b61d5b917e82087cc312880fc5a38c943
2021-06-07Increase the persistent storage size for SkSL ShadersLeon Scroggins III
Fixes: 190348616 Test: builds We're now using more complex shaders in more places. This allows us to store more of them. Change-Id: I1be3da0458c4b64f7082a2e1bc0d08b0824bbeba
2021-05-22Use TraceUtils.h from gui shared library.rnlee
Test: It makes Bug: 183120308 Change-Id: I331262dd2da59817031f0c708f4c102041dcb5e0
2021-05-18Merge "Add support to toggle different shader behaviors" into sc-devNader Jawad
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-17Correctly initialize the noise phaseLucas Dupin
To make it move smoothly throughout the animation Fixes: 186130728 Test: manual Change-Id: I78bb220f72238f13b21055c5874ce8b829171b5d
2021-05-13Merge "More benchmark tweaks" into sc-devTreeHugger Robot
2021-05-12More benchmark tweaksJohn Reck
Bug: 187718492 Test: this Change-Id: Ie0cad91e1c7d1a02704fc4b1007ba2c28cb2b3e7
2021-05-12Merge "Provide proper transform to mask canvas" into sc-devTreeHugger Robot
2021-05-12Provide proper transform to mask canvasNader Jawad
Updated mask canvas to have the same transformation applied to the initial target canvas and device Bug: 184297961 Test: manual Change-Id: Ibdeefba8ec9f95f4acd7e3176f43a5e603e76676
2021-05-12Merge "Add some more scenes, replace linear with uniform" into sc-devJohn Reck
2021-05-12Merge "Macrobenchmark tweaks & gpu memory dumping" into sc-devTreeHugger Robot
2021-05-11Add some more scenes, replace linear with uniformJohn Reck
Test: this Bug: 187718492 Change-Id: I171b5c15cd18645c2da1cffffa9635f83f8877e6
2021-05-11Merge "HWUI: mSerialContext needs to outlive other serializing members" into ↵TreeHugger Robot
sc-dev
2021-05-11Macrobenchmark tweaks & gpu memory dumpingJohn Reck
Add support for glob matching Ensure glob matches are alphabetically sorted Add feature to dump GPU memory usage after a test pass Adjust gpu memory dump to be a bit more compact (skip empty outputs) Test: this Bug: 187718492 Change-Id: I6dc80b2d3379d8d10001116e1240727d9914bc10
2021-05-11Avoid creating a layer for linear stretchJohn Reck
Bug: 187718492 Test: manual logging no layer updates during benchmark Change-Id: I9a231625142e404882be6c53fa6d01b2fb81af1a
2021-05-11HWUI: mSerialContext needs to outlive other serializing membersAdy Abraham
mSerialContext is used as the serialization context, and need to outlive mOpenMultiPicStream and mMultiPic and those are referencing it in SkSharingSerialContext SkSharingSerialContext::serializeImage Test: https://buganizer.corp.google.com/issues/182710292#comment16 Bug: 183049238 Change-Id: I25842e492d5efd7a7532964bddca61559d50ebe1
2021-05-10Updated StretchEffect typesNader Jawad
Added additional shader stretch effect type to distinguish between shader based stretches that are configured in HWUI as well as those that are configured in both HWUI and SurfaceFlinger Bug: 184297961 Test: manual Change-Id: Ie1083cef7cbaf4f877783d67d429af7f5edd0a3c
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-07Merge "Adding force-dark support to RippleDrawable" into sc-devLucas Dupin
2021-05-06Adding force-dark support to RippleDrawableLucas Dupin
Add force-dark support to RippleDrawable by modifying the ink color. Test: manual Test: atest CanvasOp Fixes: 186130682 Change-Id: I89eaaf3afa5ec53a74d2d08de8cff6484e55a912
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-16Merge "Move sparkle animation to RenderThread" into sc-devLucas Dupin
2021-04-15Move sparkle animation to RenderThreadLucas Dupin
The sparkle loop animation was happening on the UI thread and is poses some interesting challengers: - Animations freezes when UI thread is busy, for example when startActivity is called. - onDraw calls add unnecessary work to the UI thread, leading to jank in some cases, like PIP Test: manual Fixes: 184760248 Change-Id: Ie2840c767da61476678839eaac215dc3aff95b5c
2021-04-15Merge "Fix size calculation" into sc-devTreeHugger Robot
2021-04-15Fix size calculationJohn Reck
size is in bytes Fixes: 185429940 Test: builds Change-Id: Ib80eecd9ee8830877cfd9861d7126201d88d3f32
2021-04-14Add GL_CHECKPOINT before invoking webviewJohn Reck
Fixes: 185351688 Test: builds Change-Id: I57d184c4d252efef66cdf22e3b83d377a60c94e4
2021-04-09Merge "Make SkiaVulkanPipeline go through RenderThread to get VulkanManger." ↵Greg Daniel
into sc-dev
2021-04-08Make SkiaVulkanPipeline go through RenderThread to get VulkanManger.Greg Daniel
Previously the pipeline held a referance to the VulkanManager on the RenderThread. However if the RenderThread ever deleted or recreated its VulkanManager the pipline would not update its reference and cause crashes when accessed. This change makes it so the pipeline always goes through the RenderThread to get the VulkanManager. Test: Manual build and running on phone Bug: b/184287126, b/183289296 Change-Id: I52b37d0aa85b553e358285fa3654c2169971ffde
2021-04-07Do not use SkImageFilter for StretchNader Jawad
Refactor stretch implementation to manually draw the shader as a rect instead of using SkImageFilter Bug: 184184033 Test: Re-ran stretch tests Change-Id: I6263f5474b185b3f81ef9fd1bec3e43e86da49f2
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-04-06Add MultiDisplayList + memory leak fixesJohn Reck
MultiDisplayList can contain either a SkiaDisplayList or a CanvasOpBuffer. However DisplayList itself still points to the SkiaDisplayList-only wrapper to avoid any std::variant or std::visit overhead just yet. Also fixes a memory leak in CanvasFrontend from an uninitialized std::optional and a few minor leaks in unit tests. Test: build & hwui_unit passes Fixes: 184680809 Change-Id: Ifa6b723b6456f5d3eeac1201e76f337250103d6f Merged-In: Ifa6b723b6456f5d3eeac1201e76f337250103d6f (cherry picked from commit d34d6cec97c8f1be92f676aeb79c83d57cf8c6ba)
2021-03-03Wire SKSL based stretch shader to HWUINader Jawad
--Ported SKSL based stretch shader from OpenGL prototype --Hooked up the stretch APIs in RenderNode to the stretch shader. --Updated RenderNode layer logic to promote the RenderNode to a layer if there is a stretch to be applied to it in order to feed the layer as input to the stretch shader Bug: 179047472 Test: builds + sample overscroll stretches + updated CTS test Change-Id: I744ff70099fe251ce07f23d067bf13444a468c08
2021-03-03Merge "Respect paints aa setting when drawing bitmap" into sc-devNathaniel Nifong
2021-03-01Remove flushAndSubit from SkiaPipeline renderFrame.Greg Daniel
Previously we would submit a command buffer for the frames draws and then immediately submit a second command buffer that had no commands and just an attached semaphore. This merges those two submit calls into Skia into one call. Test: manual running of system of benches Bug: 175913056 Change-Id: If0d054960de8b459814cbfa9289756f8ee9d4a93 (cherry picked from commit f16ba6019400ec7eb6ac7a2adc05ec06ad5661a1)
2021-02-26Respect paints aa setting when drawing bitmapNathaniel Nifong
Bug: b/177218339 Test: run test app on pixel 3a which draws rotated bitmat with and without aa. Change-Id: Id3719a1206149ffb53fccc3dd47cec309f44f8e1
2021-02-23Simplify paint filteringMike Reed
Removes complication of copy-on-write intermediate class, and allows for shaing a single applyLooper() function. Test: make Bug: 178700363 Change-Id: Ia74cb8e7c650e469b8429de1d7cf9204821d8f11
2021-02-21Revert "Revert "Simplify calling loopers""Mike Reed
This reverts commit 1edec35288c7f2cb133d2f9f76d490155ec2a3be. Previous attempt at this mistakenly used a pointer to an rvalue, which was out of scope when it was used. e.g. const SkPaint* sk_paint = filterBitmap(paint); ... // now use sk_paint <-- bad Test: make Bug: 178700363 Change-Id: I2e2913385e05257c482a5d12eaeaddadd04126e2
2021-02-21Revert "Simplify calling loopers"Chris Fries
This reverts commit 07c0b7c0d13369a4d20ed833c8fb8e2e52cd216e. Reason for revert: http://b/180818875 systemui crashloops in libhwui Change-Id: Id62860d43d7fac572bd94ebc4fe5cc1ff7cc6820
2021-02-18Simplify calling loopersMike Reed
Test: make Bug: 178700363 Change-Id: I087df21cc78fb60b8075027ba116489a9da63c58
2021-02-17Custom looper code for AndroidMike Reed
Test: make Bug: 178700363 Change-Id: I1d328275ab5e0c9b6b9171ef075f71274e50a3f5
2021-02-08Remove two macrosJohn Reck
This is colliding with ag/13519705 and causing build issues. So replace the macros with constexpr's which are better Bug: 179047472 Test: make Change-Id: Icf7c38077ef608ec97e737d47d3d6c25246190bf