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)
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
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
ReorderBarierDrawables includes SkiaPipeline just for the sake of
lighting, however SkiaPipeline brings much more unnecessary
dependencies. Splitting lighting our of SkiaPipeline should
make dependency resolution simpler.
Bug: 117921091
Test: all tests should pass
Change-Id: I6adf7c43555cfa3ff7090a1197fc11160d3a85ec
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
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
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
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
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
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
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
Need to disable this for SurfaceTexture users specifically
but the quickest is to just disable it globally
Bug: 115311435
Test: builds
Change-Id: I75daddf993c784238593db3d40126af0e9d0ffdc
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
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
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
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
This removes the duality of DisplayList, removing a small amount of
overhead
Test: buids & hwuiunit passes
Change-Id: I8bb3a20e9ead1caec4b4a8a3e9f2c08f717a7096
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
Merged-In: Ic0446a0d861e86a5a9d0382346b57fcc45c8a61b
Change-Id: Ic0446a0d861e86a5a9d0382346b57fcc45c8a61b
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
Bug: 78288006
Test: hwuiunit passes, systrace showed work distribution as expected,
and photos using HW bitmaps still works
Change-Id: Id3285b637b5d74d3c5891ed3051ac1e44015987a
Bug: 73392905
Test: New test added with I2d4ef440f943a50b9367976ba1444f4350071bfd
When providing a width and height, getBitmap should scale to the
destination. Add a parameter to LayerDrawable::DrawLayer for a
destination rectangle to scale to. Pass the size of the bitmap in
SkiaOpenGLPipeline::copyLayerInto down to DrawLayer. The only other
caller of DrawLayer is unaffected.
Change-Id: I7aa192181c2d15bc8fd4de2fb15c4d276b05d2ac
When requesting an SkImage from a android::Bitmap we will also
return a colorFilter that will perform the sRGB conversion at draw
time.
Bug: 62347704
Test: CtsUiRenderingTestCases, CtsGraphicsTestCases, CtsViewTestCases
Change-Id: Icc4694e2c42605e29fcc834c252bc21263bac658
Support F16 render targets in Skia pipeline. Enable readback from
F16 surface.
Test: device boots with Skia pipeline
Change-Id: Ib31e618be1a987de3736987a496c799693923594
Fix drawing of bitmaps with color profiles. This CL is making
ColorSpaceTests and Rgba16fTests CTS tests to pass with Skia
pipeline. Drawing bitmaps withs pixels outside SRGB range
may need more work (ColorSpaceTests#testDrawDisplayP3 test use a
a wider gamut, but the actual pixels fall into the SRGB range).
Test: Ran CtsUiRenderingTestCases with HWUI and Skia pipeline.
Bug: 62347704
Change-Id: I8d318076bb38f7d32bfde7e5492ae7a61f4731a5