Commit Graph

8870 Commits

Author SHA1 Message Date
Romain Guy
26b6a64953 Use EGL_EXT_gl_colorspace_scrgb instead of *_linear
Since hwui output non-linear scRGB data in wide-gamut, use
the scRGB-nl extension instead of scRGB.

Bug: 62951776
Test: Manual, CtsGraphicsTestCases
Change-Id: Ifdb288e777d12b790b93624ccea9b4f1f6966e52
2017-07-11 09:48:28 -07:00
Adam Lesinski
fba0cf2950 AAPT2: Fix processing of quotes in XML
When processing attributes in XML, quotes can't be used to mark a
section as whitespace preserving, so the assumption should be that the
entire string is whitespace preserving, which makes quote characters
literals.

Bug: 62840718
Bug: 62840406
Test: make aapt2_tests
Change-Id: I4afff02148b5b8e78833abf1f323c2f5325d6155
2017-07-07 13:23:55 -07:00
TreeHugger Robot
3a38fb3e5c Merge "Add missing notifyPixelsChanged" 2017-07-07 03:07:26 +00:00
John Reck
abbedfc84f Add missing notifyPixelsChanged
Fixes: 63400947
Test: CTS test PixelCopyTest#testReuseBitmap
Change-Id: Iad6fe331f84415528c1858a1fdbf26bce784cd53
2017-07-06 23:01:39 +00:00
John Reck
f211cc462e Update LeakChecker debug log
Test: manual
Change-Id: I3c2f8c77dba2955d5cebb1c3d511411350e18850
2017-07-06 12:52:51 -07:00
John Reck
34781b2530 Move frame history into jank tracker
Test: hwui_unit_tests & manual
Change-Id: If761947652750640268217cd8cd97c8382441b44
2017-07-05 16:48:09 -07:00
John Reck
7075c79209 Split out jank data from policy
Move ProfileData out to its own file with helper
accessors. This keeps policy (what is/isn't jank)
outside of the data storage.

Also use lambdas to iterate over the histogram
to make it nicer for dumping & proto-ifying.

Test: hwui_unit_tests pass & jank data still dumps

Change-Id: I88488369ec77590a2867f51128e65bb786aa34e6
2017-07-05 14:04:51 -07:00
Adam Lesinski
2fa4a346ec Merge "AAPT2: Auto-version adaptive-icon XML" 2017-06-30 01:12:35 +00:00
John Reck
0fb794b13e Merge "Merge "Selectively disable filtering if estimated safe" into oc-dev am: 38c97237e3 am: dfce81961d" into oc-dr1-dev-plus-aosp
am: 2b17d4d4c0

Change-Id: Ie041acbd829b618e3a6d69de0462165c334816f7
2017-06-29 02:34:40 +00:00
John Reck
d814ac8e70 Merge "Selectively disable filtering if estimated safe" into oc-dev am: 38c97237e3
am: dfce81961d

Change-Id: I8bf7663f2f5aecf22fc83304e09dc7d7f5cc1028
2017-06-29 02:20:55 +00:00
John Reck
dfce81961d Merge "Selectively disable filtering if estimated safe" into oc-dev
am: 38c97237e3

Change-Id: Ic3be7167429e8cd6a291ac0465e883522afcf9e3
2017-06-29 02:13:18 +00:00
Adam Lesinski
5b7337f77c AAPT2: Auto-version adaptive-icon XML
Auto version adaptive-icon XML to v26.

This change makes the logic for generating versioned resources
simpler by changing the comparison function of ResTable_config
to evaluate the sdkVersion property last, making configurations
that differ only in sdkVersion next to each other in a sorted vector.

Bug: 62316340
Test: manual (verified output of tools/aapt2/integration-tests/AppOne)
Change-Id: I977d45821722a65d2135efb4693304eacc565c9a
2017-06-28 11:20:17 -07:00
John Reck
7bf96a0a6f Selectively disable filtering if estimated safe
If the output matches the source rect then use
GL_NEAREST instead of GL_FILTER. This is a more
pixel-exact capture.

Bug: 38242146
Test: CtsUiRendering & CtsViewTestCases:.PixelCopyTest passes on fugu
Change-Id: I9f57a4124374568f83d45fdc8f83cc767ded888a
2017-06-28 18:13:19 +00:00
Sean Lu
2307bb2acb Merge "[Resources] house keeping in TypeList" am: ff2e03cfce am: 516bd5f862 am: 2d604852ce
am: 5386fcf965

Change-Id: Iafa12b6189d9b97354adcff2a481602db9522c48
2017-06-27 00:33:00 +00:00
Sean Lu
5386fcf965 Merge "[Resources] house keeping in TypeList" am: ff2e03cfce am: 516bd5f862
am: 2d604852ce

Change-Id: I983ab5312b484a8d3f8adafd693f2435c460ab5a
2017-06-26 23:09:29 +00:00
Sean Lu
516bd5f862 Merge "[Resources] house keeping in TypeList"
am: ff2e03cfce

Change-Id: I22b0a87776d794f23f70f2f9d8d885761c0b8d14
2017-06-26 22:59:35 +00:00
Mike Reed
46199f8bcf relax expected tile modes
Skia reserves the right to optimize 1xN or Nx1 shaders to change the
tilemode, since for a dimension of 1, all modes give the same result.

Test: hwui_unit_tests

Change-Id: I832865dab67b8ae3bdfaea8f9d04bdd64e4a60c6
2017-06-26 13:09:25 -04:00
Sean Lu
83df8423e9 [Resources] house keeping in TypeList
Symptom: Type was freed but still may be access
Root Cause: TypeList not cleared
Solution: clear the TypeList
Project: AOSP
Note: None
Test: Yes

Change-Id: I00225165a30d15a299b7a483ea393b4447d2a3fc
2017-06-26 18:25:37 +08:00
Romain Guy
bd98e00d43 Merge "Merge "Add support for RGBA_F16 readbacks" into oc-dr1-dev am: 43e02a3ec5" into oc-dr1-dev-plus-aosp
am: 375206c86d

Change-Id: I920cea7cedfd1a91ce7cdaf8d89c3ad45884b030
2017-06-19 21:14:29 +00:00
Romain Guy
88e060f881 Add support for RGBA_F16 readbacks
WCG windows render into RGBA16F surfaces, we need to give the readback
API the ability to read the raw source data for testing.

Bug: 62728191
Test: CtsViewTestCases
Change-Id: I93ead84207dab38fba02d4419b5ae18df9555f8e
2017-06-16 18:07:54 -07:00
Derek Sollenberger
c970184c15 Merge "Revert buffer age workaround for Adreno GPUs." 2017-06-15 12:54:23 +00:00
Romain Guy
1d2ac86f98 Merge "Use RGBA16F layers when wide color gamut rendering is on" into oc-dr1-dev am: 9ae7bb7aa3
am: feb1609657

Change-Id: Icc5ea6789affa4c8cf09051add0ed78fe2a2e9d1
2017-06-14 23:06:18 +00:00
TreeHugger Robot
9ae7bb7aa3 Merge "Use RGBA16F layers when wide color gamut rendering is on" into oc-dr1-dev 2017-06-14 22:50:43 +00:00
Romain Guy
07ae505d40 Use RGBA16F layers when wide color gamut rendering is on
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-14 13:44:08 -07:00
John Reck
7a3433a991 Merge "Add a workaround for simulate secondary display" into oc-dev am: 31443a17e8 am: f0d3971021
am: 2d41b97bc3

Change-Id: I4de4d39d14746691ca74e13918f3ae06476b91bc
2017-06-14 20:43:12 +00:00
John Reck
2d41b97bc3 Merge "Add a workaround for simulate secondary display" into oc-dev am: 31443a17e8
am: f0d3971021

Change-Id: I5ee14c0887eaeac267c815851ae6f9e8ee47d80f
2017-06-14 20:31:11 +00:00
John Reck
94ed3c84d6 Merge "Add a workaround for simulate secondary display" into oc-dev
am: 31443a17e8

Change-Id: Ib248882df61f0d45b7687726c1a57de6c289a9b5
2017-06-14 20:27:09 +00:00
John Reck
f0d3971021 Merge "Add a workaround for simulate secondary display" into oc-dev
am: 31443a17e8

Change-Id: Ic63e4f48ec55bce9f51089bc41481ab8805ae8c7
2017-06-14 20:25:03 +00:00
Derek Sollenberger
b5a12bd1b9 Revert buffer age workaround for Adreno GPUs.
We now have a fix in the driver so we don't need this workaround
any more.

Test: hwuimacro savelayer2 --onscreen
Bug: 31957043
Change-Id: I8d8a4abcfa809d0cdab3bf63d7f8255febf2aa06
2017-06-14 15:23:19 -04:00
John Reck
a896306c38 Add a workaround for simulate secondary display
To workaround a deadlock caused by bufferqueue locks
we force RenderThread over to use async mode which
we enable via eglSwapInterval(0)

Bug: 38372997
Test: steps in the bug
Change-Id: Ia305f73abbdd64ab0c25d1f7d32792cc6295a0ce
2017-06-14 10:50:14 -07:00
Roozbeh Pournader
554585e08d Merge "Get underline position and thickness from the font" 2017-06-09 21:44:59 +00:00
Jorim Jaggi
f852cee52a Merge "Properly run window animations at vsync-sf (1/2)" into oc-dev am: d1f55f6302
am: 8fee9425e4

Change-Id: I0e88c75cea5b39aadd829470c1b299cf10444e5a
2017-06-09 04:24:38 +00:00
Jorim Jaggi
8fee9425e4 Merge "Properly run window animations at vsync-sf (1/2)" into oc-dev
am: d1f55f6302

Change-Id: Ibc28f6019637dbc9696c62f1ad1ce4679954fbd5
2017-06-09 04:16:28 +00:00
Jorim Jaggi
9f23608173 Merge "Properly run window animations at vsync-sf (1/2)" into oc-dev
am: d1f55f6302

Change-Id: Ibbb9214593ee1b5dd51a0b0da8815c270b875257
2017-06-09 04:15:12 +00:00
Jorim Jaggi
34a0cdb98e Properly run window animations at vsync-sf (1/2)
- Add new Choreographer instance that runs on vsync-sf
- Use this new Choreographer for WindowAnimator, and remove all
the hacks around it

Test: Open apps and close apps, notice no stutter
Test: Screen zoom animations
Test: go/wm-smoke
Bug: 36631902
Change-Id: I988ae25645effc3ac20efa7cb9b68f23444da0d0
2017-06-08 17:22:43 -07:00
Roozbeh Pournader
ca8a04a366 Get underline position and thickness from the font
Previously, font underline position and thickness were fixed in Android.
Although a custom font may have specified a different value, such a value
would never be used. Now we use the values from the font if they are
provided and fall back to the old default values only if needed.

Bug: 62353930

Test: adb shell am instrument -w -e package android.graphics com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: adb shell am instrument -w -e package android.text com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: cts-tradefed run cts-dev --module CtsTextTestCases
Test: Manual
Change-Id: I6bf21000dd69a2780c894b231638bc0c122e41f4
2017-06-08 14:13:57 -07:00
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