Commit Graph

4416 Commits

Author SHA1 Message Date
Brad Stenning
1be127b866 Update Icon find shared library resources
Icon is building its own resource object and not including the default flag that would allow for including of shared-lib resources

Bug: 187332041
Test: Manual
Change-Id: I121b5f75cbe7d125f8adddb30c84024e2b1a80c7
2021-05-05 21:09:34 +00:00
Nader Jawad
603d612707 Merge "Update hole punch logic in HWUI" into sc-dev 2021-05-05 02:59:18 +00:00
Jorim Jaggi
a4d6988f12 Merge "Mark first frames in metrics properly" into sc-dev 2021-05-04 10:55:59 +00:00
Nader Jawad
197743ff9c Update hole punch logic in HWUI
--Updated HWUI holepunch logic for SurfaceView to
also apply the stretch to the hole punch
--Updated RenderNode callbacks to also include
an offset from the ancestor RenderNode that also
has a stretch configured on it
--Added new test activity to verify hole punch
logic

Bug: 179047472
Test: manual
Change-Id: Ibbaf8248a31839ba9dc352ecb9fef54e1276918e
2021-05-03 18:08:47 -07:00
Jay Aliomer
7df767f3d8 Merge "Only generate paint/mask bitmap when starting animations" into sc-dev 2021-05-03 19:06:53 +00:00
Jay Aliomer
8cd53fb886 Only generate paint/mask bitmap when starting animations
Fixes: b/185570903
Test: performance testing bitmap threashold
Change-Id: Ia94011b3c7c34bf44e9ed7356873748724059c2a
2021-05-03 13:07:59 -04:00
Jorim Jaggi
9516605d63 Mark first frames in metrics properly
Such that we only set the flag in case window visibility actually
changes. There are a lot of other cases where we need to do a
window relayout which can lead to visible jank.

Test: FrameMetricsListenerTest, manual
Bug: 185902609
Change-Id: Ia09ce640f3a89bf9dd4ff0f4e4469e88a513709a
2021-05-03 15:49:25 +02:00
Seigo Nonaka
2a77167ce4 Skip FontFamily creation if the font files don't exists.
Bug: 186580197
Test: atest FontFamilyUpdateRequestTest FontListParserTest
      FontManagerTest NativeSystemFontTest
      PersistentSystemFontConfigTest SystemFontsTest
      SystemFontsUniqueNameTest UpdatableFontDirTest
      UpdatableSystemFontTest
Change-Id: Ibbcfb9ed43d05dd9db0132f3a7cb0321243be054
2021-04-28 17:06:17 -07:00
John Reck
3aa5a8fb72 Merge "Fix that CSL cache hits produce bad drawables" into sc-dev 2021-04-27 19:59:13 +00:00
John Reck
b541034702 Fix that CSL cache hits produce bad drawables
onState() needs to be called to initialize the color to be drawn
with. ColorStateListDrawable(ColorStateList) does this as part
of the call to setColorStateList(), however this was missing from
ColorStateListDrawable(ColorStateListDrawableState) which is hit
when doing ColorStateListDrawableState#newDrawable() when
Resources has a cache-hit on a drawable to load.

Fixes: 186254988
Test: app in bug
Change-Id: Ifb3626f6f85b03dd66142a2f91ba06bc648bff16
2021-04-26 21:16:44 -04:00
Brian Osman
28fd1926c0 Merge "Update frameworks/base to use newer SkRuntimeEffect::MakeForShader" into sc-dev 2021-04-26 21:52:55 +00:00
TreeHugger Robot
6a31678645 Merge "Fix a potential thread safety issue in VectorDrawable" into sc-dev 2021-04-26 20:41:47 +00:00
Brian Osman
64ee324b93 Update frameworks/base to use newer SkRuntimeEffect::MakeForShader
This enforces stricter rules on the SkSL at effect creation time, and
ensures it's valid as an SkShader (vs. an SkColorFilter). Also updated
some SkSL that was already (or would become) illegal:

- Child shaders must be declared 'uniform', not 'in'
- sampling a child requires coordinates

Bug: skia:11813
Change-Id: I743b985b5012723186a43e58e9e3ccf29d809d2b
(cherry picked from commit 7556777511)
2021-04-26 18:31:36 +00:00
John Reck
549ee05ac5 Fix a potential thread safety issue in VectorDrawable
Bug: 158839504
Test: speculative
Change-Id: Id9f229f08fe5897dda25441fbaa15c98f8130de9
2021-04-22 16:55:09 -04:00
Seigo Nonaka
80269f9f2b Use PostScript name as a key of updated font map
Bug: 185818011
Test: atest FontManagerTest
Test: atest UpdatableFontDirTest
Test: atest UpdatableSystemFontTest
Test: atest FontFamilyUpdateRequestTest
Test: atest PersistentSystemFontConfigTest
Test: atest SystemFontsUniqueNameTest

Change-Id: I78e6ee962dbd50201105599361727b71de11cf2a
2021-04-22 10:51:32 -07:00
Lucas Dupin
68ff6fb718 Merge "Clamp ink color alpha" into sc-dev 2021-04-21 16:24:42 +00:00
Lucas Dupin
fe06390a3c Clamp ink color alpha
On the old version of the ripple, the alpha is limited to 50%, we should
also do the same on the latest designs.

Bug: 184165556
Test: manual
Change-Id: Iec14394e0a0bca00283a713a409dd0794eb6fb9a
2021-04-20 21:36:37 -07:00
Lucas Dupin
668bb09e1a More subtle sparkle animation
- Reduce sparkle size
- Make sparkles fade out earlier
- Adjust animation duration

Test: visual
Fixes: 185826327
Change-Id: I477300f861dad4ec489b7a4d36b0ed7d75bf72e8
2021-04-19 15:40:55 -07:00
Lucas Dupin
469e1b4942 Merge "Make sparkle color and alpha customizable" into sc-dev 2021-04-19 21:32:28 +00:00
Lucas Dupin
9548384364 Make sparkle color and alpha customizable
This CL introduces a new attr: effectColor.
The attribute can be used on ripple tags to customize the color and
alpha of the ripple decoration.

It's also possible to change the effect color via code by invoking
RippleDrawable#setEffectColor.

Fixes: 185602477
Test: atest RippleDrawableTest
Change-Id: I9b50f330729a67ef4b529283a92c83c28387fa0b
2021-04-19 21:32:12 +00:00
Huihong Luo
81d78b91f9 Merge "Webview overlay support" into sc-dev 2021-04-19 04:45:52 +00:00
TreeHugger Robot
2ce8aef9ee Merge "Update native font API to read updated font files." into sc-dev 2021-04-17 22:36:55 +00:00
TreeHugger Robot
0566ee964d Merge "Add FontConfig.Font.getPostScriptName API" into sc-dev 2021-04-17 22:34:51 +00:00
Huihong Luo
054b8d3000 Webview overlay support
The basic idea is to create a child surface control from the root surface control passed from ViewRootImpl to the render thread.

Transactions are sent back to the java layer to get merged.

In case of offscreen layers, SurfaceControl must be disabled.

This new feature is disabled for Vulkan at the moment, a new CL will be used to enable the support.

Bug: 173671170
Test: manual, webview apks
Change-Id: I119405d13eca3c59fd3ec78e50dc7739f78411d4
2021-04-17 13:24:48 -07:00
Seigo Nonaka
5681124abb Add FontConfig.Font.getPostScriptName API
Bug: 184003133
Bug: 185508395
Test: atest FontManagerTest#fontManager_PostScriptName
Change-Id: Ie44e0d500c61b37035a0b39039891da13cd6a5ce
2021-04-17 00:46:04 -07:00
Lucas Dupin
6d1601a740 Move sparkle animation to RenderThread
The sparkle loop animation was happening on the UI thread and is poses
some interesting challengers:
- Animations freezes when UI thread is busy, for example when
  startActivity is called.
- onDraw calls add unnecessary work to the UI thread, leading to jank
  in some cases, like PIP

Test: manual
Fixes: 184760248
Change-Id: Ie2840c767da61476678839eaac215dc3aff95b5c
2021-04-15 15:26:32 -07:00
Seigo Nonaka
b950a1f746 Update native font API to read updated font files.
Bug: 184974821
Test: atest NativeSystemFontTest
Change-Id: Ia7fdf6155e07445d7f16edb88fd2a7293e63080c
2021-04-15 11:03:37 -07:00
Jorim Jaggi
10f328c580 Change hwui jank detection to use deadline & gpu completion (1/2)
- Use GPU finish time as well as actual deadline to determine jank
rate.
- Use dynamic interval to adjust for 60/90hz switching
- Move frame metrics reporting into JankTracker to adjust the
deadline communicated to the app when in stuffing scenario.
- Adjust double-stuffing detection to be a bit more readable.

Test: GraphicsStatsValidationTest.java
Test: adb shell dumpsys gfxinfo
Test: FrameMetricsListenerTest
Test: Log output of FrameMetricsObserver
Bug: 169858044
Change-Id: I3a6b8ed163e2cf9cf2b67667110340ebe35f98a1
2021-04-13 15:18:27 +00:00
Bo Liu
027b218847 Integrate HWUI with PerformanceHintManager
PerformanceHintManager.Session is in java, so add JNI and a HintSessionWrapper
class in HardwareRenderer. Then pass the two calls as two std::functions
into DrawFrameTask.

Note Session is created per HardwareRenderer, not global (per
RenderThread).

Session includes UI thread, render thread, and the thread pool.
Desired duration is from the intended start duration to the frame
deadline. Add an actual frame start time to compute

Add system properties:
debug.hwui.use_hint_manager to enable PerformanceHintManager
debug.hwui.target_cpu_time_percent to control percentage of frame time
  to be used for target cpu duration.

Test: Manual test that there are no crashes and values make sense.
Bug: 158791282
Change-Id: I83f25433c10daa20033803fb7c4ae45eab34f1d3
2021-04-10 10:21:17 -07:00
Jeff DeCew
7e70261733 Merge "Use ImageResolver for BigPictureStyle when using BigPicture" into sc-dev 2021-04-09 14:24:34 +00:00
Jeff DeCew
64686e20e4 Use ImageResolver for BigPictureStyle when using BigPicture
Bug: 163595585
Fixes: 183719542
Test: manual visual testing
Change-Id: Id86cd976a0f28978d697dd6f46cc29c4b76fcc8b
2021-04-08 20:04:36 -04:00
Lucas Dupin
ad14c212bc Merge "Ripple radius bug" into sc-dev 2021-04-08 23:49:41 +00:00
Lucas Dupin
990702017c Merge "Correctly fade sparkles in" into sc-dev 2021-04-08 23:28:56 +00:00
Lucas Dupin
b2e37616d3 Correctly fade sparkles in
The ring that masks sparkles was suddenly appearing after a few frames,
causing the sparkles to show up, instead of fade in.

Fixes: 184594674
Test: visual
Change-Id: Id88c26352379e689663808fa8c70834b7ea840b5
2021-04-08 13:12:58 -07:00
Lucas Dupin
439036a934 Do not animate sparkles when animations are off
Bug: 184746725
Test: manual
Test: car CTS
Change-Id: I5c25678760f2f76cda8430c33b4c75d14ae43903
2021-04-08 10:37:08 -07:00
Jay Aliomer
3047cb298d Ripple radius bug
Fixes: b/183912412
Test: manual test
Change-Id: I9bf3a32f2f983eb6d837e1e51d6feb1845564d22
2021-04-08 17:05:00 +00:00
Nader Jawad
2dc632aee3 Holepunch layers for SurfaceView
Update RenderNodeDrawable to hole punch areas into
layers created for SurfaceView

Bug: 184297961
Test: Added CTS test to SurfaceViewTests
Change-Id: I1f03a4fe34c5a8b7411ebe728ea3d4195fcd1fac
2021-04-06 22:03:00 -07:00
Lucas Dupin
8be19c6101 Merge "Add turbulence effect to Ripple" into sc-dev 2021-04-06 19:58:58 +00:00
Lucas Dupin
451cba0722 Add turbulence effect to Ripple
Test: visual
Fixes: 184176112
Fixes: 184188444
Change-Id: I06d04d71f115d61b05b5dcb0be95e661a5c66f9d
2021-04-06 09:56:25 -07:00
Lucas Dupin
a2bb76b684 Slide ripple slower
Slide it over 450ms instead of 105

Fixes: 184594292
Test: visual
Change-Id: Ic27bc2eaa618195841c106f486d1bff7676a1e88
2021-04-05 20:23:36 -07:00
Lucas Dupin
ba58f850d4 Merge changes Id157edb7,I94b05bf1 into sc-dev
* changes:
  Ripple size and easing
  Make sparkle area larger
2021-04-05 21:41:48 +00:00
mk.lee
0e717a9d06 Add 8k bitmap render support
Support vendor configure max bitmap size, because of
8k bitmap was over 100M

Bug: 178353420
Test: build

Change-Id: I582883cca51d42505ec8a81044e471998b88854b
2021-04-05 10:38:22 -07:00
Lucas Dupin
d1da7e0af9 Ripple size and easing
- make sparkles a little larger
- adjust easings
- adjust fade in/out

Test: visual
Fixes: 184444641
Fixes: 184443654
Change-Id: Id157edb7e41e8e55bd57bb376497431f9a3c90f0
2021-04-05 10:00:17 -07:00
Lucas Dupin
19c6382263 Make sparkle area larger
Fixes: 184444212
Test: visual
Change-Id: I94b05bf132dee22e6f2507e21e61ddb094b9c506
2021-04-05 10:00:08 -07:00
Lucas Dupin
fb3e48e50e Merge "Revert^2 "Enable new ripple"" into sc-dev 2021-04-02 00:01:10 +00:00
Lucas Dupin
4176f5fa5f Replace animator with render loop logic
The animator had infinite duration, and was only cancelled during a
render loop. It was possible that it would get stuck, leaking the
drawable.

Bug: 183950010
Test: TaplTestsLauncher3 (on sysui studio)
Change-Id: I2cc0d69ef19bb4fb775d319befde9bfc9df8d0ae
2021-04-01 15:26:59 -07:00
Lucas Dupin
834aa9c63b Revert^2 "Enable new ripple"
cd26c64db7

Change-Id: I60dad0674b89a11cf23a38a2b8e025afab5535b7
2021-04-01 16:56:26 +00:00
Treehugger Robot
9864e155a8 Merge "[LSC] Add LOCAL_LICENSE_KINDS to frameworks/base" am: 7226ad3729 am: a087245e03 am: 3dd40d172b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1661581

Change-Id: I99cb5fd94c4ee02688709ad00e3ffbc3e2f388e7
2021-04-01 13:47:07 +00:00
Bob Badour
de423b7a58 [LSC] Add LOCAL_LICENSE_KINDS to frameworks/base
Added SPDX-license-identifier-Apache-2.0 to:
  drm/java/Android.bp
  graphics/java/Android.bp
  identity/Android.bp
  identity/java/Android.bp
  keystore/java/Android.bp
  location/java/Android.bp
  location/tests/Android.bp
  lowpan/java/Android.bp
  media/mca/effect/java/Android.bp
  media/mca/filterfw/java/Android.bp
  media/mca/filterpacks/java/Android.bp
  mime/java/Android.bp
  mms/java/Android.bp
  opengl/java/Android.bp
  rs/java/Android.bp
  sax/java/Android.bp
  services/tests/servicestests/test-apps/PackageParsingTestManifests/Android.bp
  telecomm/java/Android.bp
  telephony/common/Android.bp
  tests/FlickerTests/test-apps/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
  telephony/java/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I2ee0af9ce8f74de2172b359b41d2c52a8b8f7e6c
2021-03-31 19:55:25 -07:00
Vadim Tryshev
f2ab932abf Merge "Revert "Enable new ripple"" into sc-dev 2021-04-01 02:26:37 +00:00