summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread
AgeCommit message (Collapse)Author
2020-05-07Avoid excessive KGSL mapsJohn Reck
Hook MIN_UNDEQUEUED_BUFFERS if possible to avoid thrashing kgsl maps when render_ahead is being used Bug: 143555869 Test: verified kgsl maps only happened once per buffer Change-Id: I985fae0a9a7635be3a1cf6177186e5541a1169df
2020-05-01Merge "Revert^2 "hwui: remove FatVector"" into rvc-devDheeraj Shetty
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-30Send drawFinish callback even if did not drawchaviw
There are cases where ViewRootImpl requests to draw, but there was nothing new to draw. In that case, the callback will never be invoked and ViewRootImpl will wait forever. This change will invoke the callback even if there is nothing to draw. It will use the last frameNumber since nothing new has drawn Test: Request draw with nothing new. Callback is invoked Fixes: 155429223 Change-Id: I7c9ed7fd63a451b17133a11ffbcf8fb64be558e5
2020-03-26[HWUI] Add null check for CanvasContextAlec Mouri
If ReliableSurface is forced to acquire a fallback buffer then the Surface may be abandoned. When getting frame timestamps we need to check that the Surface still exists. Bug: 152262035 Test: builds, boots Test: dumpsys gfxinfo Change-Id: Ifdb198ebf74cc9dc681c4ab51c4901176a7f5fc9
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-14[HWUI] Remove libgui from libhwui's dependency listAlec Mouri
* Add sync features extensions into EglExtensions * Header cleanup Bug: 136263382 Test: builds Change-Id: Ibd29cfe5201419210c9dc09e82af10524454b6cd
2020-02-14[HWUI] Remove references to gui/Surface.Alec Mouri
ANativeWindow usage now has enough feature parity so that we can use that instead. Bug: 137012798 Test: builds Test: Scroll through settings Change-Id: I0054315058b28bcb5e779a6f71a3cfb164625a5f
2020-02-14Merge "[ANativeWindow] Rename allocateBuffers to tryAllocateBuffers"TreeHugger Robot
2020-02-13[ANativeWindow] Rename allocateBuffers to tryAllocateBuffersAlec Mouri
Renaming was done in response to API feedback. Bug: 148962594 Test: builds Change-Id: I05b3e99800d967dda243b6e7af48f1b645909bdd
2020-02-13[HWUI] use ANativeWindow_getLastQueuedBuffer apiAlec Mouri
Bug: 137012798 Test: builds Change-Id: Ic33a21a73b0579726f47c53cc102fb91b5ead0d6
2020-02-07Merge "hwui: remove FatVector"Tim Murray
2020-02-07hwui: remove FatVectorTim Murray
FatVector now lives in fw/native/libs/ui. Test: builds, boots, works Bug: 149096186 Change-Id: I09dc2fddd2a238ef47d7853b64b0bfbf74d3f71f
2020-02-06Merge "Ensure SkiaPipeline always has a valid colorspace."Derek Sollenberger
2020-02-06[HWUI] use native_window timestamp apisAlec Mouri
These aren't finalized as stable yet until we sort out some BufferQueue challenges. Bug: 137012798 Test: builds Change-Id: Icd5eb02afc4cf16a2be485e6710f71818b300b9d
2020-02-06Ensure SkiaPipeline always has a valid colorspace.Derek Sollenberger
Previously we didn't assign a colorspace to the pipeline until it was provided a surface to render into. This resulted in undefined behavior if the application attempted to render an offscreen layer before the OS provided the main window with its surface. Now instead of deferring setting whether or not the application is wide gamut we do initialize it to a default setting when the pipeline is created. Bug: 148042673 Test: apct/device_boot_health_check_extra_postsubmit Change-Id: I84d743511e949ac977486470bb14eec936de7f88
2020-02-05Merge "Adjust present time calculation"John Reck
2020-02-03Adjust present time calculationJohn Reck
Adjust the target present time when using render_ahead to better fit in the gaps between vsync pulses. This prevents small clock drifts from causing jank. Bug: 143540628 Test: manual, looked at systrace Change-Id: I26ae6ebf16a3dea48dfd8e1c420d9e5e43e42bcb
2020-02-03[HWUI] Use ANativeWindow_getNextFrameId api.Alec Mouri
This is part of the work to move away from gui/Surface and onto ANativeWindow in HWUI. Bug: 137012798 Test: builds Change-Id: I5862d7833b583b8295d1677e725ed58d97808b27
2020-01-30[HWUI] Hook up ANativeWindow_allocateBuffersAlec Mouri
Bug: 137012798 Test: builds Change-Id: Iefe7b73470cb6229fc72d1a1aa33eceb827f527c
2020-01-30[HWUI] Use ANativeWindow inteception methods in ReliableSurfaceAlec Mouri
Test: boots Test: manually test with opening and scrolling through settings app Change-Id: I8d7a44d3ead0b2350318e1514153e256f97ccca5
2020-01-10Add memory tracing in HWUIStan Iliev
Add ATRACE memory counters to track memory usage at the end of each frame in HWUI. There are 3 catagories: CPU, GPU and Texture memory. There are 3 more counters for memory that can be purged. This CL deletes GpuMemoryTracker class, which implemented similar function for Android O HWUI renderer. Test: Collected systrace with gmail and setting. Test: memory tracing adds ~0.1ms per frame when ATRACE is enabled Bug: 146580770 Change-Id: Icbcc0478bc426dff578e83726fe7c95df171ed93
2020-01-08Merge "[HWUI] use AChoreographer in place of DisplayEventReceiver."TreeHugger Robot
2019-12-26[HWUI] use AChoreographer in place of DisplayEventReceiver.Alec Mouri
Bug: 136262896 Test: builds, boots Test: scroll through settings app Test: Toggle between 60/90hz and observe systrace Change-Id: I8eef306a968525c55f3863ae688545faa43b23be
2019-12-23[HWUI] Minor ANativeWindow usage cleanupAlec Mouri
* Remove unused header in EglManager * Rename usage of rotation flags to use the public names. Bug: 137012798 Test: builds Change-Id: Ia603e8d74c6ba51f77e352333d1e82816582d827
2019-11-21Fix for Surface#lockHardwareCanvas lockupsJohn Reck
By avoiding setting a dequeue buffer timeout we avoid hitting a different path in BufferQueue that prevents async behavior from happening. This restores P's behavior in this path. Bug: 143860379 Test: repro app in bug Change-Id: Iffbd9f9e6689a40876ff3aa74c10020e3f09fc6a
2019-11-13Fix an issue with GPU stats not enabledStan Iliev
Invoke Surface::enableFrameTimestamps after eglDestroySurface. eglDestroySurface internally disables time stats. Order is important, when CanvasContext::setSurface is invoked with a surface, that is already current (which happens all the time). Test: ran UiBench microbenchmark tests Change-Id: I3d023c3a87da6329c556426d553c744e541b9dff
2019-11-08Decouple SurfaceTexture from HWUIStan Iliev
Remove all Skia and HWUI types from SurfaceTexture implementation. Move SurfaceTexture to libgui (ag/9578265). Define private C++ API for SurfaceTexture, which is consumed by DeferredLayerUpdater. Move AutoBackendTextureRelease/Skia code from SurfaceTexture to HWUI. Test: pass CtsUiRenderingTestCases and CtsViewTestCases Bug: 136263580 Change-Id: I3f971bb490f64a3ac0b2a66a89ba935bf7f08213
2019-11-07Merge "[HWUI] Get DeviceInfo through stable ABI"Alec Mouri
2019-11-04[frameworks][base][hwui] re-fix -Wimplicit-int-float-conversionNick Desaulniers
A new instance snuck in since I haven't completed the platform toolchain upgrade yet. There was imprecision in this call; accept it by making the implicit cast explicit. Bug: 139945549 Test: mm Change-Id: Id704d9741b480eba4cf3955e70119d935776faf6 Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2019-10-31Fix wrong surfaceRequiresRedraw checkJohn Reck
We only need to redraw if the size /changed/ not if it was the same. Also fix damageId to not use frameNumber as repeated redraws of the same frame would toggle. Bug: 143711430 Test: systrace Change-Id: I8ac4629c9ff4fd51de33d1be7aa46ccc995ba342
2019-10-29Merge "[HWUI] Use ANativeWindow_get{Height, Width}"TreeHugger Robot
2019-10-25[HWUI] Use ANativeWindow_get{Height, Width}Alec Mouri
gui/Surface will eventually be removed since HWUI needs to depend on a stable ABI, so use the NDK methods for querying width and height that operates on ANativeWindow instead. Bug: 137012798 Test: builds Change-Id: I1309e31992190e7b44c6ea83f962f372b6b0afcf
2019-10-25Merge "Delete VectorDrawableAtlas"John Reck
2019-10-25[HWUI] Get DeviceInfo through stable ABIAlec Mouri
This also removes the dependency on ui/DeviceInfo other than in test code. Bug: 136263392 Bug: 136263238 Test: builds, boots Change-Id: I6a4687e981359f0e6beb83be8a5501ed7fd16f15
2019-10-21Fix buffer damage for quad-bufferJohn Reck
Test: none Change-Id: I4789d84945e381d67e96ef37554a161dbd0ab16c
2019-10-09Merge "Revert "Drop all caches in UI_HIDDEN""TreeHugger Robot
2019-10-08Revert "Drop all caches in UI_HIDDEN"John Reck
This reverts commit 8a207962ec84904a0fb8c7b5ce547ed2d1b59794. Bug: 142301356 Test: none, speculative Reason for revert: Seems to break alarm? Change-Id: Ia1680d1a937b596297c2eab3e54476daf9589347
2019-10-04Delete VectorDrawableAtlasJohn Reck
Poking around in a few apps it doesn't appear that the VectorDrawableAtlas is achieving sufficient utilization to justify its existence. The potential for draw call merging doesn't seem warranted for the RAM cost of the atlas. Bug: 137853925 Test: builds Change-Id: Id2419bc6dccb6316636d50c568f8fac75a2d563f
2019-10-04Drop max texture cache size from 12x to 5xJohn Reck
Bug: 137853925 Test: none Change-Id: I8d05871a5f54c8e5d6528a6a8ed48f73464a1221
2019-10-04Drop all caches in UI_HIDDENJohn Reck
Bug: 137853925 Test: none Change-Id: Idf7002d9b07cc6b71b38ce76e7b6382100279a99
2019-10-02Merge "[HWUI] Remove nanosecond conversion from duration queries."Alec Mouri
2019-09-20Merge "[HWUI] Use ANativeWindow_setDequeueTimeout"Alec Mouri
2019-09-12Merge "[HWUI] hook in ANativeWindow_getLastDequeueStartTime"TreeHugger Robot
2019-09-11Merge "Switch to using GrContext::setResourceCacheLimit and ↵TreeHugger Robot
getResourceCacheLimit"
2019-09-06[HWUI] Remove nanosecond conversion from duration queries.Alec Mouri
Now that they return nanoseconds, there's no reason to lose precision. Bug: 137012798 Test: builds Change-Id: I52ca20cb010b4f1829596e0a765b7013ae3665ca
2019-09-06[HWUI] Use ANativeWindow_setDequeueTimeoutAlec Mouri
Don't use the ReliableSurface version now that we have an APEX stub. Bug: 137012798 Test: builds Change-Id: I63d1d9d2ff60b54a75d5b4865a63eb22ac347208
2019-09-06[HWUI] hook in ANativeWindow_getLastDequeueStartTimeAlec Mouri
Bug: 137012798 Test: builds Change-Id: I37fd2a7c40398053082f606f0a085db0a239e2e0
2019-09-06Switch to using GrContext::setResourceCacheLimit and getResourceCacheLimitRobert Phillips
The old version that took a maxResourceCount are now deprecated Test: does it compile Change-Id: Ib4d69c8907169329c7765c648f46fa5e4a10bf7a
2019-09-05[HWUI] use ANativeWindow_getLastQueueDuration apiAlec Mouri
Replaces the query call with an abi-stable one. Bug: 137012798 Test: builds Change-Id: Ia8f01c3be0b79037cef88782913af55f6d00a6a2