4630 Commits

Author SHA1 Message Date
Darwin Huang
234748cd64 Merge "Fix misspelling in SurfaceTexture#attachToGLContext javadoc" 2022-02-09 16:17:27 +00:00
Melvin Moreno
4f24757202 Fixed documentation typo on TextAlign getter and setter methods - Reported on http://b/216852542
Change-Id: I950251451d49f97c8c3ef0539218189d4ff74ab6
2022-02-08 17:45:42 +00:00
Darwin Huang
7bd04e97a2 Fix misspelling in SurfaceTexture#attachToGLContext javadoc
I assume "unusued" was supposed to be "unused"...

Change-Id: Id44a21cca0aadb054e395450ab57b200b5f65a9d
2022-01-28 19:12:08 +00:00
Christos Gkekas
2a3830faab Merge "Fix documentation of Outline#setRect(int, int, int, int)" 2022-01-11 11:54:51 +00:00
Christos Gkekas
3524740735 Fix documentation of Outline#setRect(int, int, int, int)
Change-Id: I15a5e2fe07aea78a5fa72f472011ecda63abf813
2022-01-10 18:37:11 +00:00
Xin Li
10d9972786 Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918
Bug: 205056467
Merged-In: I13199bc39e9445929195f3d15579cbffe94e92b0
Change-Id: I35fa3c6c2abf679c51033f1395a08d511ed8739f
2021-11-18 17:00:37 +00:00
Brett Chabot
3f8b9fe50b Backport 'Add ability to disable GL draws'.
This feature is intended for use in headless test environments,
where disabling drawing has minimal compatibility impact and can
save significant resource usage when running UI tests.

This feature is controlled via a new system property
'debug.hwui.drawing_enabled', and a HardwareRenderer API that can
override the property value on a per-process basis.

Bug: 201691826
Test: boot emulator
Merged-In: I93c21e680382e03342f235dbf58bd7a5c8a6f767
Change-Id: I391c841e3a0cdcfcc6c7910a316a4dd5e970547d
2021-10-26 21:16:16 +00:00
Shuzhen Wang
3e4720b3b4 ImageFormat: Fix YCBCR_P010 bitsPerPixel
For P010 format, Each pixel has Y and subsampled CbCr. So:
bitPerPixel = 1.5 * bitPerPixelY
bitPerPixelY = 16 bits

Bug: 200949749
Test: Camera CTS
Change-Id: I7964d64c25961dbef634ac1ef82898147ec57111
2021-09-23 22:25:09 +00:00
Seigo Nonaka
4ed687a48f Filter Alias which points non-existing font family name
The FontFamily will be removed if none of font files exist on the
device.

Bug: 192479819
Test: atest FontListParserTest
Change-Id: I36f6476fe37bc04ec8737936747385c63908d651
(cherry picked from commit 691cfe8818513e576300cdb963a65341984659c4)
2021-08-26 06:21:18 +00:00
Alec Mouri
b0766d70d9 Merge "Remove bitwise plane information from ImageFormat's P010 docs" into sc-dev 2021-08-13 18:42:57 +00:00
Alec Mouri
edae98a45a Remove bitwise plane information from ImageFormat's P010 docs
Some vendors may prefer a different underlying layout for P010 in the
future compared to the one currently supported in gralloc. In
particular, it's not a guarantee that the CB/CR plane is contiguous in
memory with the Y plane.

Bug: 195570363
Test: builds
Change-Id: I01eea78b8555610470959cdb4f0f9ceb16e80f73
2021-08-12 16:49:58 +00:00
Leon Scroggins
9817790471 Merge "Do not turn on dithering by default" into sc-dev 2021-08-09 23:34:12 +00:00
Leon Scroggins III
eb5a3553dc Do not turn on dithering by default
Bug: 195281495
Test: Ief7025c21f365ae90fa63120f1cc82e0695901af

This is a partial revert of 47c51fe80e3dd9d6b518c11c2e1714c271835af5/
I5d5d03e430af380e23016c6deba5eca46067a22b. The intent was to bring
today's rendering implementation in line with the old HWUI
implementation, which always dithered gradients by default. However,
when dithering is enabled, the Skia implementation dithers more than
just gradients (e.g. Bitmaps). Combined with poor performance of the
dithering algorithm on certain GPUs, this led to a performance
regression on key apps.

Change-Id: Id54121091e2cc47131dc9b5ae67bd638fbc005fc
2021-08-09 15:11:20 -04:00
Lucas Dupin
c359d54b49 Merge "Do not run background animation without a Looper" into sc-dev 2021-08-05 22:44:56 +00:00
Lucas Dupin
84922f4f43 Do not run background animation without a Looper
Apps that create RippleDrawable on a background thread could crash,
making them incompatible with S.

Test: manual with MindBody app
Fixes: 194952073
Change-Id: I9d16d5c63c192e96191b4fbc859ff3bc3da733cb
2021-08-05 09:18:32 -07:00
John Reck
a355e904a2 Have RippleDrawable ignore non-attached RenderNodes
Don't try to do a RenderNodeAnimation if the RenderNode
isn't attached. Although this isn't strictly speaking a
valid state to be in, it's also easy for RippleDrawable
to just ignore it.

Bug: 186864959
Test: ripples still show up, are still RT accelerated normally
Change-Id: I8127f1419508157eb83ac9bb1562745ac53d2ced
2021-08-04 18:22:16 +00:00
Vishnu Nair
40ddf958e6 Merge "SurfaceView: Synchronize destframe updates with SurfaceView size changes" into sc-dev 2021-08-02 23:35:38 +00:00
Vishnu Nair
f13eac9f7e SurfaceView: Synchronize destframe updates with SurfaceView size changes
This CL fixes one of the issues with SurfaceView parent frame and
content syncing.

With BLAST, we have two surface controls each setting a scale. The
parent surface control sets a scale based on the requested surface
size and the SurfaceView layout size. The BlastBufferQueue surface
control scales the buffer to the requested buffer size if the buffer
has the appropriate scale mode.

The destination frame controls the second scaling and it must be
applied with the parent surface scale changes. This cl fixes flickers
where the requested fixed surface size changes without any view size
changes. This cl allows the caller to pass in a transaction to
BLASTBufferQueue#update which is updated with the destination frame
changes. This transaction can then be applied with the parent
surface changes.

This also fixes an issue where destination Frame was being set on
every buffer update and when we updated the BlastBufferQueue size.
Since buffer transactions can be queued up on the server side, a
stale value maybe applied for a few frames causing flickers.

Fixes: 194458377
Test: bug repro steps
Test: atest SurfaceViewSyncTest#testSurfaceViewSetFixedSize

Change-Id: I118bd1c3942b389e3951c3fd7389403895fc7b31
2021-07-30 16:18:21 -07:00
Jay Aliomer
304b04a492 Reset patterned animations when solid ripple is reset
Fixes: 194655257
Test: visual using the material demo app + MX player
Change-Id: I47805fe1a36bdadd7de45008c42cf2fcb23d223a
2021-07-29 12:53:50 +00:00
Bo Liu
6a3fc60f43 Switch HWUI to use native performance hint API
Test: None
Bug: 194204196
Change-Id: I80dfdb5d56921c465406cc4534e82738c668d46d
2021-07-22 11:33:01 -04:00
Huihong Luo
eb93107b57 Add a sys prop to control WebView Overlays support
The boolean system property is named as "debug.hwui.webview_overlays_enabled"

Bug: 192267127
Test: change the property value, check presence of Webview Surface
Control

Change-Id: I01e3e26282a5fa79aa504a6e49c5abe1a1c3ea02
2021-06-30 11:47:21 -07:00
Huihong Luo
7580a2dd98 Merge "Fix a crash caused by transaction" into sc-dev 2021-06-24 20:27:48 +00:00
Huihong Luo
4df4151bc0 Fix a crash caused by transaction
A native transaction passed from webview is sent back to native side, so java side does not manage the life cycle of the transaction.

Bug: 191414767
Test: Play a video, switch to another app, wait for 10 seconds
Change-Id: I013052c202b445438d6cb6497f5f9a2fc22a2b85
2021-06-24 11:10:06 -07:00
Jay Aliomer
4508c4ab85 Fix ripple radius calculation
Fixes: 191608957
Test: manually using the material showcase app
Change-Id: I3a89d200a842b3dd5f34ffc94a2c62c6fab9436e
2021-06-24 12:19:38 -04:00
Huihong Luo
17410b668f Merge "Fix z-order for webview surface control" into sc-dev 2021-06-18 19:53:34 +00:00
Jay Aliomer
ccc98b8d6e Merge "Update patterned ripple mask when changed" into sc-dev 2021-06-18 17:57:57 +00:00
Huihong Luo
34f42fdecd Fix z-order for webview surface control
Set the root surface control transparent, and set the z order of the newly created child surface control to -1.
A new callback is needed to update root surface control in sync from Java side.

Bug: 186750329
Test: use latest APKs from Webview team, play a video, mini toolbar should be visible
Change-Id: I0b37ee8f83fd2b41ff4f2856dbadd31ff6170baf
2021-06-18 10:14:22 -07:00
Jay Aliomer
b7eab7fee6 Merge "Fix invalid ripple bounds" into sc-dev 2021-06-18 03:31:35 +00:00
Huihong Luo
fec5e82e69 Merge "Fix potential ASurfaceTransactionCallback leaks" into sc-dev 2021-06-17 16:32:06 +00:00
Jay Aliomer
88114108ee Update patterned ripple mask when changed
Fixes: 188601242
Test: visual
Change-Id: I036564223e27a5630151ef2a9a5a81b29e291a49
2021-06-17 01:00:45 -04:00
Lucas Dupin
8bdce16ce4 Fix invalid ripple bounds
Test: manual
Fixes: 188112758
Change-Id: I6e23c02adc4761fde2e69bafc341066be15f63ee
2021-06-17 00:18:05 -04:00
John Reck
85933d4c55 Fix ripples not going away
Fixes: 191141356
Test: ripples on calculator
Change-Id: Icabf80914c5ba9c0649e69ef0fa67c03d6ad5cdd
2021-06-16 15:48:33 -04:00
Huihong Luo
1d88151a38 Fix potential ASurfaceTransactionCallback leaks
Change the rerferene to java object from global reference to weak
reference.

Bug: 188555236
Test: check number of ViewRootImpl objects from Systrace
Change-Id: I52347b9efb211691826635d046259bc3c54b194f
2021-06-16 09:47:04 -07:00
TreeHugger Robot
7395d119e6 Merge "Put starting the animation back inside state changed check" into sc-dev 2021-06-14 17:01:42 +00:00
John Reck
7c0a17c042 Put starting the animation back inside state changed check
Only start or stop the ripple if the state changed.
Avoids accidentally starting 2 ripples when the overall
state set changed but the state_activated specifically did
not.

Fixes: 188062293
Test: manual
Change-Id: If32f1ee5ad3e7294e2e6924b1a4a0e4070c8bcfc
2021-06-10 16:42:26 -04:00
TreeHugger Robot
15cc80b39c Merge "Use RobotoStatic-Regular for the weight 400 of roboto family" into sc-dev 2021-06-08 17:57:30 +00:00
Lucas Dupin
6e9adc7f5c Merge "Isolate focus color filter" into sc-dev 2021-06-07 22:47:20 +00:00
Lucas Dupin
562e3d6af1 Isolate focus color filter
The mask color filter has an alpha applied to it, it should not be used
on the focused states.

Focus works differently, where the alpha is defined by the state itself
(20% for hover, and 60% focus,) combined with the paint alpha.

Test: adb shell input keyevent 22
Test: manual on list item (not masked)
Test: manual on button (masked)
Fixes: 184717563
Change-Id: I01b8540face638330d016b413e70f2b74ce5592c
2021-06-07 12:13:17 -07:00
Seigo Nonaka
cec02064d4 Merge "Calculate set of available fonts in native" into sc-dev 2021-06-03 23:26:17 +00:00
Seigo Nonaka
d5ecababb4 Calculate set of available fonts in native
The previous attempt[1] of improving SystemFonts API is not good enough
for users. To further improve the performance, calculate font uniqueness
in native code. From Android S, the system font information is stored
in native code and has more information for skipping duplication check.

Bug: 188201287
Test: atest FontFamilyUpdateRequestTest
Test: atest FontListParserTest
Test: atest FontManagerTest
Test: atest NativeSystemFontTest
Test: atest PersistentSystemFontConfigTest
Test: atest SystemFontsTest
Test: atest SystemFontsUniqueNameTest
Test: atest UpdatableFontDirTest
Test: atest UpdatableSystemFontTest
Test: minikin_tests
Change-Id: Ib375dcda0f278c93ec8dd21636d7a22b4174f214
2021-05-27 15:54:24 -07:00
Lucas Dupin
da517d5370 Merge "Revert "Enable dithering on RippleDrawable"" into sc-dev 2021-05-27 19:07:56 +00:00
Lucas Dupin
2a5d63d8bd Revert "Enable dithering on RippleDrawable"
This reverts commit 1cbfc3b00bd058e8bddd93cd5fc9b4e0b985420e.

Reason for revert: CL was no-op
Bug: 189281134
Change-Id: I2c70b51dd1d2f679a8310b1847675360ce415d35
2021-05-27 19:07:35 +00:00
Lucas Dupin
5941f0fb95 Merge "Enable dithering on RippleDrawable" into sc-dev 2021-05-26 20:39:09 +00:00
Lucas Dupin
9f6fb354e8 Constant sparkle scale
Drawables from different themes are yielding different densities.
Framework themes are returning 160 (DENSITY_MEDIUM), while AppCompat
is reporting 420 (DENSITY_420.)

This is causing the sparkles to have completely different sizes on
the same device, which is wrong.

Fixes: 189236372
Test: manual
Change-Id: Ia79e360123cf740aaba85d5348f07604c2b39026
2021-05-26 09:31:24 -07:00
Lucas Dupin
1cbfc3b00b Enable dithering on RippleDrawable
Per UX request, given that gradients started to show some banding.

Test: manual
Fixes: 189281134
Change-Id: I8898f2463c6e07c390c07c242b6632dcbb9c3ef3
2021-05-26 09:13:51 -07:00
Seigo Nonaka
18c044d31b Use RobotoStatic-Regular for the weight 400 of roboto family
Bug: 189235998
Test: Manually done
Change-Id: I253a72df5641b57d371598cec6853737c5e98ba9
2021-05-25 14:09:52 -07:00
Lucas Dupin
2011da8730 Merge "New shader parameters" into sc-dev 2021-05-25 18:54:21 +00:00
Lucas Dupin
8a7d4e2b2a New shader parameters
- Fading out sparkles earlier
- New density and size for sparkles
- Overall timing tweaks
- New turbulence parameters

Test: manual
Fixes: 188453593
Fixes: 188454455
Change-Id: I70e364c84cc04f653618ea811a817d9f82895af5
2021-05-25 09:35:17 -07:00
Seigo Nonaka
9c16cc5a3e Merge "Skip buffer equality check for SystemFonts" into sc-dev 2021-05-21 05:03:38 +00:00
Seigo Nonaka
5abd5dfd9d Skip buffer equality check for SystemFonts
All system font files are file backed and stored in the unique place,
so no need to compare the buffers during creating sets of system fonts.

Bug: 188201287
Test: atest FontFamilyUpdateRequestTest
Test: atest FontListParserTest
Test: atest FontManagerTest
Test: atest NativeSystemFontTest
Test: atest PersistentSystemFontConfigTest
Test: atest SystemFontsTest
Test: atest SystemFontsUniqueNameTest
Test: atest UpdatableFontDirTest
Test: atest UpdatableSystemFontTest
Change-Id: I4a4680937988c013aaa4e4fa729e61ac8514c513
2021-05-20 15:56:43 -07:00