8834 Commits

Author SHA1 Message Date
TreeHugger Robot
12741cec2d Merge "Implement CacheManager for the Skia pipelines." 2017-06-06 20:37:08 +00:00
Derek Sollenberger
f9e45d1d81 Implement CacheManager for the Skia pipelines.
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-06 14:19:37 -04:00
Chris Craik
bde482c78c Merge "Temporarily enable HWUI opengl validation" 2017-06-05 21:57:50 +00:00
TreeHugger Robot
aeb22da1bd Merge "Implement HW Bitmap for Skia pipeline" 2017-06-02 22:06:37 +00:00
TreeHugger Robot
0ecc0ff5e0 Merge "Enable wide color gamut rendering" 2017-06-02 20:07:56 +00:00
Stan Iliev
7bc3bc6028 Implement HW Bitmap for Skia pipeline
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-02 15:59:42 -04:00
Romain Guy
26a2b97dbe Enable wide color gamut rendering
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-06-02 11:02:13 -07:00
John Reck
d721b45535 Merge "Fix ANR & Crash on Ryu" into oc-dev am: 6890dc95d0
am: 7e206e5d66

Change-Id: I5da5af01d7ba897f964e6e5356f12ac01681ca43
2017-06-02 00:03:37 +00:00
John Reck
7e206e5d66 Merge "Fix ANR & Crash on Ryu" into oc-dev
am: 6890dc95d0

Change-Id: I5f0a2fc7ab40b702e3e81ceb3bebd8ef44d22298
2017-06-01 23:55:23 +00:00
Arun
c1e1d156f3 Merge "Optimised hwui rounded corners shader" am: d7287c96eb am: ed7bdd6549 am: 92ef0a59f8
am: 11e44273dc

Change-Id: Iad6d7763cb5e1d4524b7a4a48fec333f90a597e5
2017-06-01 23:53:13 +00:00
Arun
11e44273dc Merge "Optimised hwui rounded corners shader" am: d7287c96eb am: ed7bdd6549
am: 92ef0a59f8

Change-Id: I9f5e6ef057ba6049804226d65f2f2f06594efc69
2017-06-01 23:42:06 +00:00
Chris Craik
d17b63cbfc Temporarily enable HWUI opengl validation
Bug: 38416992
Test: full make, device boots
Change-Id: Ib4c058ec24a8cb46b18964635d51e266d7dcd196
2017-06-01 14:48:30 -07:00
Arun
06e9f324ef Optimised hwui rounded corners shader
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
2017-06-01 13:42:12 -07:00
John Reck
a67b62e15e Fix ANR & Crash on Ryu
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
2017-06-01 13:00:34 -07:00
Narayan Kamath
2fd6b667a3 Merge "Revert "Temporarily enable HWUI opengl validation"" 2017-06-01 09:00:26 +00:00
Narayan Kamath
d6b42a9f7a Revert "Temporarily enable HWUI opengl validation"
This reverts commit 39aa790f744d504dfcafbf5e9224b7d9906067e4.

Seems to have broken all builds on master. Unclear why the presubmit
succeeded.

Test: make

Change-Id: I1ff8472495b5aafe6c1c89c1c8385d94ae584685
2017-06-01 08:57:58 +00:00
TreeHugger Robot
68784db7b7 Merge "Temporarily enable HWUI opengl validation" 2017-06-01 07:07:59 +00:00
John Reck
677728d09b Merge "Fix dequeus outside of frame drawing" into oc-dev am: 944b0c73a4
am: 55302e2f4e

Change-Id: Ie4e36cf857fae21261108f2913c10618b8b98d9c
2017-06-01 06:25:01 +00:00
John Reck
55302e2f4e Merge "Fix dequeus outside of frame drawing" into oc-dev
am: 944b0c73a4

Change-Id: Id9152a19194e1817f83a33b14a6cdccaa84dfeb7
2017-06-01 06:17:58 +00:00
Chris Craik
39aa790f74 Temporarily enable HWUI opengl validation
Bug: 38416992
Test: device boots

Change-Id: I20b7e3546f29c0a0d3e41a7cdafbcc5f4ad387e2
2017-05-31 16:06:02 -07:00
John Reck
32414eea3e Fix dequeus outside of frame drawing
Bug: 62213889
Test: Repro steps in bug
Change-Id: I8fc407b280ba82c669fc2bb03750cab139adb965
2017-05-31 14:02:50 -07:00
Derek Sollenberger
3980acb013 Merge "Don't crash when presented with non-roundRect clipping outline." into oc-dev am: 2b81530bd2
am: 86c40b5099

Change-Id: Ia5b5fb05cc1eb6d04396bf599617ed6bca40e748
2017-05-31 16:28:51 +00:00
Derek Sollenberger
86c40b5099 Merge "Don't crash when presented with non-roundRect clipping outline." into oc-dev
am: 2b81530bd2

Change-Id: I9da0d02131eefdb38b6025d4cdc6fb27ab3c82f2
2017-05-31 16:09:50 +00:00
Florin Malita
b4bee88180 Remove unneeded Skia include in ReorderBarrierDrawables.cpp
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)
2017-05-31 12:40:24 +00:00
Derek Sollenberger
f209c06d36 Don't crash when presented with non-roundRect clipping outline.
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
2017-05-26 12:11:34 -04:00
Mike Reed
2653f8324a don't need custom shader to track ref-counts
Test: hwui_unit_tests

Change-Id: Ibe67a86489e0e65251e3c0a4ddc2f72bf528f8b5
2017-05-26 10:01:35 -04:00
John Reck
13851a791d Merge "Fix null deref crash" into oc-dev am: c1affe14c2
am: 1f7f8bfddb

Change-Id: I0d82bb5d05f31e9a429517417a85d7c9fc9b2c60
2017-05-24 00:54:59 +00:00
John Reck
1f7f8bfddb Merge "Fix null deref crash" into oc-dev
am: c1affe14c2

Change-Id: Ib8e4c34fb38400dc748b463c5ab965d57e260fd0
2017-05-24 00:48:30 +00:00
John Reck
36393c3e8d Fix null deref crash
Change-Id: Ic1a64e926b5faa2f4cf8d079a2b67e0261dcecd7
Fixes: 62035692
Test: manual
2017-05-23 15:32:08 -07:00
Stan Iliev
b5ab8686fe Merge "Fix recent apps in system UI for Skia pipeline" into oc-dev
am: 4277d8f3e6

Change-Id: Ia3b645a631ce0c43278a9adde690a851d08a8be0
2017-05-23 19:29:58 +00:00
TreeHugger Robot
4277d8f3e6 Merge "Fix recent apps in system UI for Skia pipeline" into oc-dev 2017-05-23 19:19:39 +00:00
John Reck
45ef07f762 Merge "Improve time to texture destruction" into oc-dev am: 1bc0286ef8
am: 9d08fca62f

Change-Id: Iee16d786983734d138a408707cf5efd9f9c9b9fb
2017-05-23 18:01:09 +00:00
John Reck
9d08fca62f Merge "Improve time to texture destruction" into oc-dev
am: 1bc0286ef8

Change-Id: I93daab53961a018a2cf8d4e2d4d8300b84bb917e
2017-05-23 17:51:28 +00:00
Stan Iliev
f5f27cd828 Fix recent apps in system UI for Skia pipeline
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
2017-05-23 13:40:34 -04:00
Stan Iliev
c57d930457 Fix recent apps in system UI for Skia pipeline
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
2017-05-23 09:44:11 -04:00
John Reck
9a814875c4 Improve time to texture destruction
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
2017-05-22 17:17:05 -07:00
Stan Iliev
0cc4e36e10 Fix a crash in Canvas.drawBitmap if empty dest rect is passed
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
2017-05-18 15:39:12 -04:00
Jim Van Verth
b44a966c38 Merge "Update to new SkShadowUtils interface" 2017-05-17 16:58:25 +00:00
John Reck
9217cb52e2 Merge "Revert "Fix recent apps in system UI for Skia pipeline"" into oc-dev
am: 9363d33262

Change-Id: I4c67e3eea36a118beb81f4bf2029776102200cf4
2017-05-17 04:36:23 +00:00
TreeHugger Robot
9363d33262 Merge "Revert "Fix recent apps in system UI for Skia pipeline"" into oc-dev 2017-05-17 04:29:03 +00:00
TreeHugger Robot
cde40b38ac Merge "Revert "Fix recent apps in system UI for Skia pipeline"" 2017-05-17 02:07:49 +00:00
John Reck
576b6a8a79 Revert "Fix recent apps in system UI for Skia pipeline"
This reverts commit 625dd56a45bfe95c5f1baa1891529503ff3374a9.

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: I998bea04788d58ba6bad71c1691d5a3b33190c1b
Merged-In: I98b2dfd750be57a15785808e2d5723616e2ce20a
2017-05-17 00:32:09 +00:00
John Reck
59069e00a8 Revert "Fix recent apps in system UI for Skia pipeline"
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-17 00:23:44 +00:00
Jim Van Verth
749b93de5c Update to new SkShadowUtils interface
Test: Ran shadowgrid2 with change and saw no visible differences.
Change-Id: I5f47b02b67cc9de5a887d1af2eff7a181a0e46f8
2017-05-15 11:29:24 -04:00
Stan Iliev
cc78864bb7 Merge "Fix recent apps in system UI for Skia pipeline" into oc-dev
am: dad0ba155e

Change-Id: Ibd006617200e11ac929b23da279e099c9fce4ca1
2017-05-13 01:52:23 +00:00
TreeHugger Robot
dad0ba155e Merge "Fix recent apps in system UI for Skia pipeline" into oc-dev 2017-05-13 01:41:58 +00:00
Stan Iliev
625dd56a45 Fix recent apps in system UI for Skia pipeline
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
2017-05-12 19:42:33 -04:00
John Reck
cefa024e73 Merge "Switch to protobuf lite" 2017-05-12 22:21:25 +00:00
John Reck
915883b9f0 Switch to protobuf lite
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
2017-05-12 10:44:46 -07:00
TreeHugger Robot
7ede1c157e Merge "Fix recent apps in system UI for Skia pipeline" 2017-05-12 17:36:53 +00:00