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
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
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
This is a ~2x performance increase for the rounded corners shader which
was previously shader limited even on many high-end GPUs. It simplifies
the calculations by pre-dividing by the radius, which also allows to
maintain mediump/FP16 precision (this improves performance and might
improve image quality on GPUs that don't support highp e.g. Mali-400).
It also uses a conditional in the shader to save much of the work on
the vast majority of pixels which are not close to the corners.
Test: manual - visual inspection on fugu (nexus player)
Change-Id: I38f491cfb006e2991ef0b9d6b3d67d2c4d328d44
Fixes impossible dequeue crash as the wrong
start point of the frame was used. We need
to use the start point for RT, not the start
point for the frame.
Workaround for sysui ANR caused by what appears
to be a driver bug. Drivers with the bug
will have transiently higher memory usage.
Drivers without the bug will be unaffected.
Bug: 62213889
Bug: 62250550
Test: Manual
Change-Id: I9992b224f84bc1c40834bafff7e0013b38270ae0
This reverts commit 39aa790f744d504dfcafbf5e9224b7d9906067e4.
Seems to have broken all builds on master. Unclear why the presubmit
succeeded.
Test: make
Change-Id: I1ff8472495b5aafe6c1c89c1c8385d94ae584685
SkGaussianEdgeShader.h is a private Skia header, and not
used at all in ReorderBarrierDrawables.cpp.
Test: refactoring CL. Existing unit tests still pass.
Change-Id: I01c6b2a9ce53617ce338a7fbd45554d2d2604c9e
Signed-off-by: Florin Malita <fmalita@google.com>
(cherry picked from commit 4bb94d19c6771cf886f1e94dbc2ca3da9c9f8dce)
We still won't clip to the outline to match existing HWUI behavior.
Test: CTS Graphics and hwui_unit_tests pass
Bug: 38411077
Change-Id: Ia3161df77a4ccaf0e714d2fe1ac12396d1c8f9e9
Enable HW Bitmaps for Skia pipelines by using a readback to
convert GraphicBuffer into a raster SkImage. Both BitmapShader
and drawing HW bitmaps into a canvas are supported.
Test: recent apps work, no memory leaks, CTS graphics and
UiRendering tests passed, HWUI unit test passed
bug: 38136140
Change-Id: I23fed5febad3b1009e0417fb7e21a347a8d11b0d
Merged-In: I23fed5febad3b1009e0417fb7e21a347a8d11b0d
Enable HW Bitmaps for Skia pipelines by using a readback to
convert GraphicBuffer into a raster SkImage. Both BitmapShader
and drawing HW bitmaps into a canvas are supported.
Test: recent apps work, no memory leaks, CTS graphics and
UiRendering tests passed, HWUI unit test passed
bug: 38136140
Change-Id: I23fed5febad3b1009e0417fb7e21a347a8d11b0d
Eliminate textureCache.mGarbage which is only cleared
in a trimMemory. Instead when we hit ~Bitmap post a
message to RenderThread to release the texture immediately
Bug: 38258699
Test: manual
Change-Id: I962ba275e89afb628ba02f74769287edbab9fed4
Fix a crash in Canvas.drawBitmap if an empty dest or source rect
is passed. This issue is specific to Skia pipeline only.
Test: Ran hwui unit tests and verified nexuslauncher is not
crashing anymore.
Change-Id: I3f9f96d03541e960d463836200d2b01269b5e008
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
Merged-In: Ibd06c859c86dc213310d5ce5272497e1882d0cc6
Fixes: 36272398
Protobuf lite isn't just smaller, it also doesn't
have the problematic DescriptorPool at all. So no
need to switch this to a shared library.
Test: hwui_unit_test passes and doesn't crash. CTS incident tests pass
as well
Change-Id: I2693ba2c47af89a5c561c4f63cc7e1f509ebbbec