summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/EglManager.cpp
AgeCommit message (Collapse)Author
2022-03-15Merge SP2A.220305.013Haamed Gheibi
Bug: 220074017 Change-Id: Idfdd94e902f656ac65a2a75dfdd199f6f85ba472
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
2020-08-12Refactor since EGL_ANDROID_native_fence_sync is exposed via eglQueryStringYiwei Zhang
Bug: 157518032 Test: build, compile, boot Change-Id: I9dee6d54e290bdd1def44dff1f869581f9583c3e
2020-07-30Wire-up colorMode="hdr"John Reck
Fow now it uses a fixed white point of 150nits TBD if this is disabled or adjusted Test: Demo app Change-Id: Iac13597b3d7633fdef3feaf7ec1da0c27c87904c
2020-06-29Correctly expose EGL_ANDROID_native_fence_sync to hwuiAlec Mouri
When we moved off of gui/SyncFeatures for retrieving this extension, we accidentally didn't include the eglQueryStringImplementationANDROID path for retrieving extensions. Fortunately this extension is only used for TextureView synchronization, but we should still use the extension when available. Bug: 159921224 Test: Manually inject log statements to verify the extension is correctly visible. Change-Id: Idaa872778afc13e86bdea918da8631b4747fe9c1
2020-05-26switch to kDisplayP3 enumMike Reed
This has the same values as kDCIP3, just a more accurate name. See skbug.com/9792 Test: make Change-Id: Id775857f08247c49033e8c2fe0c3255dfc44cace
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
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-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-08-05Merge "[HWUI] clean up libgui include directives"TreeHugger Robot
2019-08-02[HWUI] clean up libgui include directivesAlec Mouri
As a first pass removing some stale includes. Bug: 138819035 Change-Id: I7aef319aa8f1b13b6482ef61fda151560e570558 Test: builds
2019-08-02Crash in createPBufferSurface if eglCreatePbufferSurface failsRoman Kiryanov
EglManager::makeCurrent assumes mPBufferSurface has a valid surface. This assumtion is not satisfied if eglCreatePbufferSurface fails. Bug: 138733217 Test: build Change-Id: I580dca24f440accda458d53f988bb24cbabede36 Signed-off-by: Roman Kiryanov <rkir@google.com>
2019-05-02Be quietJohn Reck
Fixes: 131863240 Test: logcat Change-Id: I0276082b949f9521a804a4c1ef8af2148b69621b
2019-04-12Support render-ahead in vulkanJohn Reck
Bug: 127822449 Test: verified render_ahead working with skiavk Change-Id: Iae1b227a763f6def035057f38cca4b0ab65c7e82
2019-01-24Remove use of SkColorSpace::Gamut enumBrian Osman
Get the gamut matrix from the color space, compare against sRGB/P3. Test: Refactoring CL. Change-Id: I9f5bcae8c1f637919ee9da892266ea882f16208c
2019-01-10Fix leak/crash in exitJohn Reck
Bug: 120440607 Test: hwuimacro32 doesn't crash Change-Id: I35b7a924e338efb314f07b923ba22ffcf98f75ee
2018-12-15[HWUI] Remove hardcoding around wide color gamut.Peiyong Lin
Previously we hardcode wide color gamut in HWUI as scRGB color space with FP16 pixel format. However, the hardware composer doesn't support this combination. This patch plumbs wide color gamut composition preference from composer API to HWUI such that HWUI can now pick the combination of color space and pixel format for the surface. BUG: 111436479 Test: Build, flash and boot, verify with a demo app. Change-Id: I7a8b4d8deca72ef40069dba9d23a3f5e90dbfe5a
2018-12-06Revert "Revert "Make HWUI's surface Reliable^TM""John Reck
This reverts commit dd08224e4d75689c42bf452d44617f84072649a1. Bug: 120097554 Bug: 120342364 Bug: 120421537 Test: verified emulator can boot OK, with no log warnings Test: verified keyboard works in landscape Change-Id: Iae2cd1140d81755b126adfb21ec885181f3bc6b6
2018-12-03Revert "Make HWUI's surface Reliable^TM"Bo Hu
This reverts commit 650bd9a7b35139354916d2522b59cc57eb5fddc3. Reason for revert: broken emulator b/120342364 Exempt-From-Owner-Approval: Change-Id: If05d9d87325e1d836375d7dc79ff66ef057d228d
2018-11-28Make HWUI's surface Reliable^TMJohn Reck
You won't believe this one weird trick to make EGL_BAD_ALLOC errors never happen again! libgui hates it! Bug: way too many to list Test: none - there probably should be, though Change-Id: I8e7fc3e584f90c01e0fd932497604a1d93710ba6
2018-11-15Add a sprinkle of speculative anti-crash dustJohn Reck
Bugs: way too many Bug: 113367810 Test: well it builds... Change-Id: If00bcaad1c535c4996b59c1b5a7d3a4bba849191
2018-09-27Partially revert "[HWUI] Implement legacy color mode."Peiyong Lin
Reason for partially revert: Step back a little bit to think about how we want to move the view system forward. This patch removes the legacy mode we have added, as well as move color type and color space of the surface to SkiaPipeline. BUG: 111436479 BUG: 113530681 Test: Build, flash, boot and check dumpsys SurfaceFlinger Change-Id: I1ab7b88d41347284d87649618e5a15f5c6bcf8fe
2018-09-18Refactor DeviceInfo in HWUIDerek Sollenberger
Remove the need for both Vulkan and EGL managers to initialize it. Also remove unused code paths. Test: hwui_unit_tests Change-Id: I33ad881468eddbf91ec63207f0d82bed8d97f5ad
2018-09-15Merge "Disable GLES validation"John Reck
2018-09-14Disable GLES validationJohn Reck
Need to disable this for SurfaceTexture users specifically but the quickest is to just disable it globally Bug: 115311435 Test: builds Change-Id: I75daddf993c784238593db3d40126af0e9d0ffdc
2018-09-13[HWUI] Implement legacy color mode.Peiyong Lin
Previously, HWUI always produces SRGB buffers. We introduced new APIs for SurfaceFlinger, a.k.a. the composer service to return to composition preference for data space, and pixel format. This patch makes HWUI query composition preference from composer service, and creates the corresponding EGL surface with the correct attributes. In legacy mode, HWUI will take the pixel value from source color space, and interpret it as pixel value in destination color space. BUG: 111436479 BUG: 113530681 Test: Build, flash, boot and check dumpsys SurfaceFlinger Change-Id: I64562d5ea6f653076c8b448feb56b5e0624bc81c
2018-09-05Reland "TextureView Vulkan support and optimized OpenGL draw"Stan Iliev
Fix an issue with incorrect texture matrix, when there is 90/270 rotation. This happened, because after refactoring SkImage has buffer width/height, instead of layer width/height. This reverts commit a683eb3945320f592f58705c3c31b3c044f4bd72. Bug: 113673613 Test: Ran TextureView CTS and lensblur in camera app Change-Id: If3bcf9cd5195de09fd67a753708568a8e3ca3a9a
2018-09-04Revert "Revert "Revert "TextureView Vulkan support and optimized OpenGL draw"""Stan Iliev
This reverts commit 85f9096b5272c9a39e592e2e97cbbe6cb0e767ab. Reason for revert: lensblur broken. Change-Id: I83ac163159fc537bc15936a0f8597a7512ca9d6e
2018-08-31Revert "Revert "TextureView Vulkan support and optimized OpenGL draw""Stan Iliev
This reverts commit 867c43de0544217d26c3ee18f4d6603bb2ea97ce. Reason for revert: Fixed issue with unsupported hardware buffer formats by landing https://skia-review.googlesource.com/c/skia/+/150470 "Support more hardware buffer formats" Bug: 113673613 Change-Id: I1f7c528f138e290160e75833c8d989d9535002ee
2018-08-30Revert "TextureView Vulkan support and optimized OpenGL draw"John Reck
This reverts commit c8e22a653297837da9a80b0ba65f6854c8986c96. Reason for revert: broke camera, b/113555199 Bug: 113555199 Change-Id: Iae9b462694d5de0cd99427afead63b567fb4d71d
2018-08-29TextureView Vulkan support and optimized OpenGL drawStan Iliev
Render TextureView as hardware bitmaps, instead of GL textures. Cache SkImage for each observed GraphicBuffer, which is faster even for GL. Implement C++ SurfaceTexture, which allows Java SurfaceTexture to be used with Vulkan HWUI render thread and application GL. threads. Delete GLLayer and VkLayer classes and texture code from old HWUI pipeline. Test: Ran skiagl and skiavk pipeline with a TextureView app. Test: TextureView CTS tests pass for GL pipeline. Test: Ran Android NDK Native codec sample app. Change-Id: Idc94f864ce2d34fd6ceff4be4fc7d3327e99879c
2018-04-26Remove RenderThread from EglManagerJohn Reck
Refactor to make EglManager re-usable. Test: hwuiunit passes, hwuimacro works Change-Id: Ie8e9398c703fada1dc5d8baca5f42485eadea202
2018-04-18Revert "Add support for render-ahead"John Reck
This reverts commit ec100976e0655acaa204c8800dfb83dadae20cc8. Reason for revert: b/77971494 Test: hwuiunit passes Change-Id: I2e7dc719d2df1dd939b275496c0edc38e458c434
2018-04-09Add support for render-aheadJohn Reck
For periods of time during which latency is less important allow a client to request a deeper render-ahead pipeline. The latency tradeoff results in less overall visual jank Test: none, only used by macrobench Change-Id: I516203b70bdc75b6415fa08bf9c4fb1b598b0102
2018-04-06Add ability to change context priority of RT GL contextJorim Jaggi
Test: Use method, observe GPU preemption behavior Bug: 75985430 Change-Id: Idc08d37f8c95f52c5aab7edf09c0cbff72b8482d
2017-12-12renderthread: relax error handling for wide gamut EGL configsRob Herring
It is valid to advertise EGL_EXT_pixel_format_float, but not have a the requested EGL config. Instead of aborting, fallback to the default behavior. Change-Id: I6c602233b627dc2070364434fece57d3d0aab435 Cc: Romain Guy <romainguy@google.com> Signed-off-by: Rob Herring <robh@kernel.org>
2017-12-11Update GrContext creation calls to use sk_spGreg Daniel
Test: manual testing Change-Id: I68d8706ffa7bc7c6622ea0b8c45d7297a131f6bf
2017-11-03Format the world (or just HWUI)John Reck
Test: No code changes, just ran through clang-format Change-Id: Id23aa4ec7eebc0446fe3a30260f33e7fd455bb8c
2017-08-30Change how distance field paths are disabledBrian Osman
The path renderer bitfield will soon be private (for Skia testing only), so switch to using the public flag. Test: Simple refactoring change, still builds Change-Id: I6715ba8addd0e104a46842f2398320d1904bb187
2017-07-11Use EGL_EXT_gl_colorspace_scrgb instead of *_linearRomain Guy
Since hwui output non-linear scRGB data in wide-gamut, use the scRGB-nl extension instead of scRGB. Bug: 62951776 Test: Manual, CtsGraphicsTestCases Change-Id: Ifdb288e777d12b790b93624ccea9b4f1f6966e52
2017-06-15Merge "Revert buffer age workaround for Adreno GPUs."Derek Sollenberger
2017-06-14Merge "Add a workaround for simulate secondary display" into oc-dev am: ↵John Reck
31443a17e8 am: f0d3971021 Change-Id: I5ee14c0887eaeac267c815851ae6f9e8ee47d80f
2017-06-14Revert buffer age workaround for Adreno GPUs.Derek Sollenberger
We now have a fix in the driver so we don't need this workaround any more. Test: hwuimacro savelayer2 --onscreen Bug: 31957043 Change-Id: I8d8a4abcfa809d0cdab3bf63d7f8255febf2aa06
2017-06-14Add a workaround for simulate secondary displayJohn Reck
To workaround a deadlock caused by bufferqueue locks we force RenderThread over to use async mode which we enable via eglSwapInterval(0) Bug: 38372997 Test: steps in the bug Change-Id: Ia305f73abbdd64ab0c25d1f7d32792cc6295a0ce
2017-06-06Implement CacheManager for the Skia pipelines.Derek Sollenberger
The core of the implementation is complete and provides heuristic cache sizing based on the size of the surface being used. This CL will also be used to add the following features in the future... 1) Support Vulkan pipeline reporting on the size of the surface. 2) Complete the VectorDrawableAtlas stub code 3) Automatic purging of stale resources for low memory devices. Test: hwui_unit_tests (new test added) and CtsUiRendering Bug: 62260637 Change-Id: Ib85159cca28b646fe249f2190b07f1b7e0f50d8f
2017-06-02Enable wide color gamut renderingRomain Guy
When wide color gamut rendering is requested, hwui will now use an rgba16f scRGB-nl surface for rendering. This change also fixes the way screenshots are handled in the platform to behave properly with wide gamut rendering. This change does not affect hardware layers. They also need to use rgba16f scRGB-nl; this will be addressed in another CL. Bug: 29940137 Test: CtsUiRenderingTestCases, CtsGraphicsTestCases Change-Id: I68fd96c451652136c566ec48fb0e97c2a7a257c5
2017-02-23Update framework to use new method for disabling DF path rendering.Derek Sollenberger
Test: compile only Change-Id: Ifa690a0af01cb6b07c4fd303302cb6a557e8dfde
2017-02-14Disable buffer age swap behavior for SkiaGL on Adreno gpusMatt Sarett
Test: Verified that this fixes rendering bugs. BUG:31957043 Change-Id: I3e5bca73eae2d917906658f76d8c432dbb248d89
2017-01-12resolve merge conflicts of ec7e2a164c37 to masterMark Salyzyn
Test: compile Bug: 26552300 Bug: 31289077 Change-Id: I49c6e41b79061e2b3c0352e3ac8fa5ebb152b6f5
2017-01-11Replace cutils/log.h and log/logger.h with android/log.h or log/log.hMark Salyzyn
(part deux) Test: compile Bug: 26552300 Bug: 31289077 Change-Id: I7417936c4d3666608fccfe51a312c90ecefba2fb