summaryrefslogtreecommitdiff
path: root/libs/hwui/DeferredLayerUpdater.h
AgeCommit message (Collapse)Author
2024-10-04Add metrics for TextureView dataspace changes Alec Mouri
Bug: 329475035 Flag: EXEMPT logging only Test: builds Test: GraphicsAtomTests Change-Id: Ia65ceb3bf205e3050b182aa6d170a453076bdc4c
2022-12-01Add missing includes of SkBlendMode.h Kevin Lubick
It's being removed from SkPaint.h in https://skia-review.googlesource.com/c/skia/+/611077 and this was all the places I could find in frameworks/base. We might need another CL for a few other Android repos. Change-Id: I88d31166ed90356c4c52fbcde6bec6c1655b7cf2
2021-11-24Support HDR tonemapping in TextureView Alec Mouri
This reuses the HDR tonemapping curve that was used in RenderEngine, however display-level metadata may not be aligned. But because there are no composition changes that can cause flicker, e.g., switching rapidly between using a TextureView and a SurfaceView, then that should be okay. That means that the HDR tonemapping is not as high quality as it could be, but it is much better than before. Bug: 200309590 Test: builds, boots Test: Instagram video preview Change-Id: I4dd042333f383f383d568b6f2326ee14facd08ed
2021-08-17Added crop rect and removed inverse of the texture matrix. ramindani
BUG=152621633 Test: Verified manually and with atest TextureViewCameraTest atest TextureViewTest atest TextureViewSnapshotTest atest TextureViewStressTest atest PixelCopyTest atest BitmapTest atest HardwareBitmapTests Change-Id: Ie993a18fd3511576617a1eb859bf228c33d12f78
2021-08-06Revert "Added crop rect to LayerDrawable to not crop TextureView..." bsears
Revert "Adds out parameters for crop rectangle and transform" Revert "Add test to crop TextureView and verify if outer edge ha..." Revert submission 15339442-1texelcrop Reason for revert: Bisection identified these CLs as the likely cause of Droidfood blocking bugs b/195620803 and b/195637414 Bug: 195637414 Bug: 195620803 Reverted Changes: If1f448a94:Added crop rect to LayerDrawable to not crop Textu... Iefde6bdf7:Add test to crop TextureView and verify if outer e... Icf0ee20e8:Adds out parameters for crop rectangle and transfo... Change-Id: I3448ebe193f25de79d186ae705911d99da2cef2b
2021-08-03Added crop rect to LayerDrawable to not crop TextureView. ramindani
Verified manually with ExoPlayer that TextureView isn't cropping. Test: Did the manual test and atest TextureViewCameraTest atest TextureViewSnapshotTest atest TextureViewStressTest atest TextureViewTest atest PixelCopyTest atest BitmapTest atest HardwareBitmapTests and with HwAccelerationTest Added crop test at ag/15430851 BUG=152621633 Change-Id: If1f448a94908cbf51272bc0d1bbbe1e113fd15f3
2021-05-26In Vk DeferredLayerUpdater make sure we releause buffers to foreign queue. Greg Daniel
For Vulkan we need to make sure that when we draw AHBs we must transition them to and from the foreign queue so that the producer is able to write new data to them and we are able to see the new writes. Test: Manual running of Lens app Bug: 178773035 Change-Id: I807709d2b671bf5a01a82237f3b5838734f0d978
2020-07-28Migrate from GrContext to GrDirectContext Adlai Holler
This is part of an effort to distinguish between different types of contexts in GPU Skia. When using a DeferredDisplayList (DDL) recorder, the context you get is not a direct context and cannot be used for operations like uploading or reading textures. Since Android does not use DDLs, it is not directly affected by this change but other APIs, such as SkImage::MakeFromTexture are being migrated to require a GrDirectContext to increase sanity. Change-Id: I9afbdf3c026a9f9cb6ad2aad904915e189e584d6
2020-04-09Remove unecessary exported symbols from libhwui.so Derek Sollenberger
Test: compiles and links Bug: 150782769 Change-Id: Ib49c1bf914b6bfaad1fb29371115df7c9eec08d2
2020-01-17Refactor TextureLayer JNI to use only APEX APIs Stan Iliev
Move ASurfaceTexture JNI implementation from libandroid to libnativedisplay. TextureLayer uses ASurfaceTexture_fromSurfaceTexture from libnativedisplay instead of libandroid_runtime code. libgui is no longer leaked through surface_texture_platform.h. DeferredLayerUpdater uses ASurfaceTexture_release instead of private ASurfaceTexture dtor. Test: pass CtsUiRenderingTestCases and CtsViewTestCases Bug: 147060713 Exempt-From-Owner-Approval: Changed only a header path in android_hardware_camera2_legacy_LegacyCameraDevice.cpp Change-Id: I9720d9c383f8120f9db116fd2b74fc241af84396
2019-11-08Decouple SurfaceTexture from HWUI Stan 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-06-21Move GL specific code away from header Fedor Kudasov
Bug: 117921091 Test: all tests should pass Change-Id: I124a17ac6a378029fc6836ad234bf45095675aae
2018-11-07Set the color space to sRGB on the Surface and remove colorFilter. Derek Sollenberger
Also for a canvas wrapping a bitmap the colorspace of the bitmap will be used to correctly blend content. Test: CtsUiRenderingTestCases Bug: 111436479 Change-Id: I63ad7a30605a7f725cc0ef4716d42ea978fb03e3
2018-09-20Refactor RenderState and remove unused functionality. Derek Sollenberger
Test: hwui_unit_tests still pass Change-Id: Ie943671535ab8c5da1bac05985e815e0cb842dc1
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 draw Stan 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-30Respect a Layer's (e.g. SurfaceTexture) colorSpace when compositing Derek Sollenberger
This CL extracts the android_dataspace from the GLConsumer and converts it to a SkColorSpace. HWUI always expects to composite into an sRGB destination so when we draw the layer we run the draw through a colorFilter that converts the input colorSpace into that of the destination. Test: CtsViewTestCases Bug: 78016220 Change-Id: Ic0446a0d861e86a5a9d0382346b57fcc45c8a61b
2017-11-03Format the world (or just HWUI) John Reck
Test: No code changes, just ran through clang-format Change-Id: Id23aa4ec7eebc0446fe3a30260f33e7fd455bb8c
2017-02-15Always flush renderstate in DeferredLayerUpdater::apply Chris Craik
Bug: 34206215 Test: hwui unit tests passing, manual test of TextureView video playback Always flush renderstate to the GlLayer's texture, regardless of whether updateTexImage has ever been called. Change-Id: I3974dce9d90633a0299e6bc4259b76c622717c90
2017-02-13DeferredLayerUpdater: clean up Layer lifecycle sergeyv
Test: refactoring CL, all existent tests should pass bug:34919311 Change-Id: Ib2889667a5ab8a2aaba443458782bc163467f0ea
2017-01-30Explicitly destroy Layer in DeferredLayerUpdater on destroyHardwareResources() sergeyv
Change-Id: I0987104eabda9a2a302b9e765213aad48f93aea4 Test: refactoring CL. Existing tests still pass bug:33753499
2017-01-18Update hwui_unit_tests to support running with Vulkan backend. Greg Daniel
Added Macros for RENDERTHREAD_TESTS which run these tests using specific backends. RENDERTHREAD_TESTS - Runs OpenGL, SkiaGL, and SkiaVulkan RENDERTHREAD_SKIA_TESTS - Runs SkiaGL and SkiaVulkan RENDERTHREAD_OPENGL_TESTS - Runs OpenGL Test: manual running of hwui_unit_tests Change-Id: Ia7420ee7a38803a15e2d58394d14b38cae8208d3
2017-01-10Add support for dummy draws for Vulkan webview and texture views. Greg Daniel
Test: manual testing Change-Id: Iaec8c3a34367673c281665ff6c6e97d1ce532265
2017-01-10Break Layer class into Gl and Vulkan subclasses Greg Daniel
Test: manual testing Change-Id: Ibd2beed39de3ac6da7448e96496253cfe427dfbb
2016-10-13use SkBlendMode instead of SkXfermode Mike Reed
use sk_sp versions of paint setters/getters Change-Id: I86591a0a8ec92e6039776cbf00424ea24f585b28
2016-09-01Merge "Fix google-explicit-constructor warnings in libs/hwui." am: ↵ Chih-hung Hsieh
7207562ff7 am: d7a69e04eb am: 842f1e48e7 am: 1f50f80aab Change-Id: I713bd07fee150cc684e630045e02872b23062a5a
2016-08-29Fix google-explicit-constructor warnings in libs/hwui. Chih-Hung Hsieh
* Add explicit keyword to conversion constructors, or add NOLINT for implicit converters. Bug: 28341362 Test: build with WITH_TIDY=1 Change-Id: Id8ca42433a4fc3652e4cb13787c4cb169f20d9a9
2016-07-26Remove LayerRenderer. Derek Sollenberger
There is only one caller each for the static functions here so this CL moves the logic to the caller. Also by moving some of the code into the pipeline it makes it easier for future changes to configure how a pipeline handles a layer. Change-Id: Ib735b5154325cbb658fd151f7a19dbf434ab44b7
2016-07-07Delete old rendering pipeline Chris Craik
fixes: 30002246 Change-Id: I45df0e924708526cee045b14c291bd23aa1a92db
2016-03-23Fix missing first frame John Reck
Bug: 26776366 Change-Id: I46258c0ff35fdefe5c9f2ee610c904b2dbe8c5d9
2015-12-16Add TextureView support to new renderer/reorderer Chris Craik
bug:22480459 Change-Id: I2e4c0bc6b904706132f3f5087ededc9cac9b40fb
2015-07-29Re-enable -Werror on clang John Reck
Change-Id: I582bd0665752c7a9deb4f9de094d0dd0a50cda6a
2015-03-10Track down unsupported texture target Chris Craik
bug:19641517 Change-Id: Idc2e413abef5bb1438ffb3f52efb001504d3e89f
2015-01-05Add overrides and switch to nullptr keyword for all files Chris Craik
Adds remaining missing overrides and nullptr usages, missed due to an extreme failure in tool usage. Change-Id: I56abd72975a3999ad13330003c348db40f59aebf
2014-11-12Change GraphicBuffer fields from uint to int Dan Stoza
This changes fields which are tracking GraphicBuffer width and height to use int instead of uint32_t, which is in keeping with a recent change to GraphicBuffer itself and avoids a warning (error since this build uses -Werror). Change-Id: I66c5c3e3d321d4ef5ea2c40c86ac068111c18662
2014-11-07resolve merge conflicts of cabf8a7 to master. John Reck
Change-Id: If0ca1c37d05f5dc471d88a3bf158dd68a1880bbf
2014-11-07Fix wrong-thread issue John Reck
Bug: 18259560 Change-Id: Ic63a86efba9c86f21defac0695a73db8b09ae284
2014-10-15Clean up physical coupling Tom Hudson
Narrow the use of #include directives in hwui, replacing with forward declarations where straightforward. Speeds compiles; doesn't do any restructuring of code. Change-Id: Icac2baffb5896f55d8c6718e9bd9d4bfa02d3ca0
2014-10-03Cleanup DeferredLayerUpdater John Reck
Bug: 17765082 DeferredLayerUpdater had fallen behind RT updates. Re-snap to latest expectations, ensuring to call requireGlContext() prior to detachSurfaceTexture to avoid leaking SurfaceTextures Change-Id: Ic65fb9831e5284f658866da8da9ad5af1d227699
2014-06-27More cleanups John Reck
Change-Id: Id5967944b949a2aec57e4fe9fdcdc04c11b8c35a
2014-06-26Animator refactoring & fixes John Reck
Tweaks animators to have less unnecessary refcounting Pull animator management out into seperate class More control to tweak animator lifecycle, such as doing Java-side handling of start delay by attaching but not starting the animator Change-Id: I4ff8207580ca11fb38f45ef0007b406e0097281c
2014-06-23No-fail invokeFunctor John Reck
Bug: 15513308 Bug: 15449247 Change-Id: I13a29f9c8d4975cdda6dcb33b6332c2555ff0f7c
2014-06-12Move LayerType to RenderNode John Reck
Change-Id: Icb79a5015cb0362b1f3a66d09007450730135a97
2014-05-30Re-jigger layers John Reck
Bug: 15185239 Bug: 15238382 Make DeferredLayerUpdater ref counted so that HardwareLayer:finalizer() works non-crashily on leaked layers Give DeferredLayerUpdater the ability to have a layer destroyer set so that leaked layers can still be recycled on the RenderThread Order layer updates based off of pushLayerUpdate() calls to fix issue with nested layers Change-Id: I4449cee607f7e5126e02fed7464cf48038e3dfdf
2014-04-14Fix issue with bitmap uploading John Reck
Bug: 13912749 Change-Id: Ic23fa1d280118dc93dc2716a4a24cc0bbbdca595
2014-04-09Merge hasFunctors & pushStaging into prepareTree John Reck
Bug: 13902607 Fixes synchronous mode for WebView in HardwareLayers Change-Id: I90de1e26dcfd9b75cc2f03bac72705fc23237b68
2014-04-07Refcount RenderNode John Reck
Change-Id: I7a86db8acc2b78ef33d987a43a119f5933d7d752