summaryrefslogtreecommitdiff
path: root/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.h
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-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-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
2019-04-12Support render-ahead in vulkanJohn Reck
Bug: 127822449 Test: verified render_ahead working with skiavk Change-Id: Iae1b227a763f6def035057f38cca4b0ab65c7e82
2019-01-14Standardize the surface origin for each HWUI pipeline.Derek Sollenberger
OpenGL prefers a bottom-left origin while Vulkan prefers the top-left. Prior to this change we were inconsistent in Vulkan by creating layers with a bottom-left origin which was different from the primary buffer. Test: CtsUiRenderingTestCases Change-Id: Icfeed4085021cae941aeab58720406e3b3e37923
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-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-20Fix crash when EGLSurface is no longer valid.Derek Sollenberger
The EGLSurface stored in the pipeline can become obsolete if the EglManager/RenderThread has to destroy the context. This CL enables the RenderThread to notify all active pipelines that their surface is invalid. Bug: 115290937 Test: hwui_unit_tests Change-Id: Ib3054822273bc35406630b7442229a81b39a2c91
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-10Refactor HWUI readback code to be backend independentStan Iliev
Implement readback from Surface, TextureView and HW Bitmap for Vulkan pipeline by wrapping the graphics buffer in an SkImage. Refactor both Vulkan and GL readback to use common code. TextureView readback is moved from IRenderPipeline interface to Readback class. Refactor all 3 readback flows to use common implementation. Test: Passed all view, uirendering and graphics CTS tests with GL Test: Passed many CTS test with Vulkan, that require readback Bug: 113673613 Change-Id: Ifbfd8170a5401f87a709b4b1b9fa058e8e11768d
2018-05-09A better HW Bitmap uploaderJohn Reck
Move all HW bitmap upload operations off of RenderThread. Ensure EGL context outlives all upload requests Bug: 79250950 Test: builds, boots, systrace is good, CTS bitmap tests pass Change-Id: I5ace6c516d33b1afdf1a407cd8b183f6b60c22c1
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-27Move all non-GL HW Bitmap work off RTJohn Reck
Bug: 78288006 Test: hwuiunit passes, systrace showed work distribution as expected, and photos using HW bitmaps still works Change-Id: Id3285b637b5d74d3c5891ed3051ac1e44015987a
2017-11-03Format the world (or just HWUI)John Reck
Test: No code changes, just ran through clang-format Change-Id: Id23aa4ec7eebc0446fe3a30260f33e7fd455bb8c
2017-06-14Use RGBA16F layers when wide color gamut rendering is onRomain Guy
Layers created using View.setLayerType() or Canvas.saveLayer() need to be RGBA16F/scRGB-nl when within a window that requested wide color gamut rendering. Bug: 29940137 Test: CtsUiRenderingTestCases, CtsGraphicsTestCases, hwui_unit_tests Change-Id: I42fd6355448c92041491a7109e3ac8a153d38bf9
2017-06-02Merge "Implement HW Bitmap for Skia pipeline"TreeHugger Robot
2017-06-02Implement HW Bitmap for Skia pipelineStan Iliev
Implement HW Bitmap for Skia pipeline. Use new Skia SkImage::MakeFromAHardwareBuffer API, which will enable to record HW Bitmap into a picture. Move logic that uploads SkBitmap into a GraphicBuffer into pipeline specific classes. Test: All CTS and other tests pass for HWUI pipleine. For Skia pipeline graphics CTS tests pass, 2 UIRendering CTS tests which excise HW bitmaps with color spaces fail, bitmapShaderEglImage macrobench fails (to be fixed by a CL in Skia), HWUI unit tests pass, no EGL leaks found. Change-Id: Id5926d7cccd81af8b55400f44fb524a427543d05
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-05-17Revert "Fix recent apps in system UI for Skia pipeline"John Reck
This reverts commit b33013fb3c570e0a3ced8729dced9f0d294761a6. Reason for revert: Caused a memory leak, b/38330767 Bug: 38136140 Bug: 38330767 Test: manual, verified memory isn't leaking doing the steps in b/38330767 Change-Id: I98b2dfd750be57a15785808e2d5723616e2ce20a
2017-05-12Fix recent apps in system UI for Skia pipelineStan Iliev
Enable HW Bitmaps for Skia pipeline just enough to make recent apps list working by adding support for BitmapShader. Drawing HW bitmaps in a canvas is also supported. Test: recent apps work, HWUI unit tests pass, CTS tests pass. bug: 38136140 Change-Id: Ibd06c859c86dc213310d5ce5272497e1882d0cc6
2016-11-03Implement Skia pipelines for OpenGL and Vulkan.Stan Iliev
Implement Skia pipelines for OpenGL and Vulkan: base SkiaPipeline, SkiaOpenGLPipeline and SkiaVulkanPipeline. Write unit tests for SkiaPipeline. Test: Built and run manually on angler-eng. Change-Id: Ie02583426cb3547541ad9bf91700602a6163ff58