Commit Graph

4464 Commits

Author SHA1 Message Date
Lucas Dupin
3e34288001 Make ripple sparkles less prominent
Test: visual
Bug: 184188444
Change-Id: Ieac0a7e7ff389f16bc4e42c14ea94182cec44c38
2021-03-31 13:48:10 -07:00
Anton Hansson
5013902a24 Merge changes I97086e30,Ic55df4cf,I81a08c29 am: 4199ef90b9 am: 4bc578052d am: ec1f981309
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1655736

Change-Id: I5d242cf5b18c4b556105cfcfe78df2ac18a8544e
2021-03-31 18:01:32 +00:00
Lucas Dupin
19f026c222 Merge "Do not scale down sparkles" into sc-dev 2021-03-31 02:43:53 +00:00
Lucas Dupin
9b1bcd73b0 Do not scale down sparkles
Doing so creates artifacts on PenTile displays.

Test: visual
Fixes: 184074874
Change-Id: I11d90d2fb9c1d21c96a7cc7383452fa7d184c7f2
2021-03-30 18:03:11 -07:00
Seigo Nonaka
38fbc56351 Use separate XML for update config in system
This CL is a refactoring to address following things:
- Separate XML definition of fonts.xml and update.
  Since there are lots of concept mismatches between system font config
  and update config, e.g. file paths, family variants, etc.
  It is good to manage separtely.

- Stop keeping udpated config in memory in FontManagerService.
  As a side effect of above change, FontManagerService no longer keeps
  FontConfig.FontFamily mappings. This will be created from XML file
  when necessary. This is better in FontManagerService since this map
  is only necessary the boot time. After the system is booted, this
  map is only necessary when the update request is called from client
  which happens quite rare.

Bug: 183752879
Test: atest UpdatableFontDirTest
Test: atest FontManagerTest
Test: atest UpdatableSystemFontTest
Test: atest FontFamilyUpdateRequestTest
Test: atest PersistentSystemFontConfigTest

Change-Id: If2c12a8029f859efc52721b07cfeab04be2deb78
2021-03-30 13:46:00 -07:00
Anton Hansson
9b2c4a650b Move framework java filegroups into subdirectories
All the java code used to build the framework jar and run metalava
was previously defined in the toplevel Android.bp files. Move these
into the subdirs where the source actually lives.

This simplifies the rules themselves (no path and needless prefix) and
declutters the top level Android.bp.

Test: m
Change-Id: I97086e309eacb879d16facb8497d9940fa5ddaf6
2021-03-30 12:26:55 +01:00
Lucas Dupin
2dc5e2b4f6 Merge "Enable new ripple" into sc-dev 2021-03-25 21:22:01 +00:00
TreeHugger Robot
13c7ee178e Merge "Ripple position of slider is incorrect" into sc-dev 2021-03-25 16:40:57 +00:00
Jay Aliomer
7d85995f66 Ripple position of slider is incorrect
modified how hotspot bound changes get handled

Fixes: b/183579918

Test: manual testing
Change-Id: I8c8f09ab4d8ea24555f02e1cd67bae4a0a2dc48a
2021-03-24 17:10:57 -04:00
TreeHugger Robot
a411746184 Merge "Preload font files based on device locale" into sc-dev 2021-03-24 19:52:50 +00:00
Nader Jawad
eae4a200d1 Merge "Fix NPE in GradientDrawable#getCornerRadii." into sc-dev 2021-03-24 17:52:18 +00:00
Jordan Demeulenaere
165995bebe Fix NPE in GradientDrawable#getCornerRadii.
Bug: 183603359
Test: atest GradientDrawableTest
Change-Id: Ia81adff60e3e9831f0119826636e75f57420932f
2021-03-24 15:40:15 +01:00
Lucas Dupin
891be74c10 Ripple UX feedback
- update ring function
- make sparkles larger
- make sparkles visible at the beginning of the animaiton

Test: visual
Fixes: 182172654
Change-Id: Ia40beebda6e5ee70d85c163eda68a8af2792ddbd
2021-03-23 21:09:40 -07:00
Seigo Nonaka
7a1c1b2cfc Preload font files based on device locale
Bug: 181692010
Test: manually done
Change-Id: If4d03542fd905aed0e4578486dcf68d1535676f5
2021-03-23 18:29:58 -07:00
John Reck
3a38f4572e Merge "Fix thread-shared field evades lock acquisition reported by Coverity" am: 66fc99d578 am: 7427d997f6 am: 7ed71bc418
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1646974

Change-Id: Ifa2be5367a1afcb9803fe129951cf6c66ce30cc0
2021-03-23 20:35:10 +00:00
TreeHugger Robot
e289502447 Merge "Remove legacy disable triple buffering config" into sc-dev 2021-03-22 19:39:44 +00:00
Xu Qian
2d33d70352 Fix thread-shared field evades lock acquisition reported by Coverity
Change-Id: Ia351e2ddc79a3f8e1b47ed1e697a2d24b2a3ebe7
2021-03-22 12:59:21 +08:00
Lucas Dupin
49a06ae96f Enable new ripple
Fixes: 183150223
Test: manual
Test: atest -it CtsGraphicsTestCases
Change-Id: I928ba73c9bcbb034760cb75841b54bbaf86bb520
2021-03-19 17:44:43 +00:00
Lucas Dupin
6ed8197ff8 UX feedback for ripple
- Updated easings
- Made sparkles larger
- Made sparkles density independent
- Modified sparkle animation speed

Fixes: 182173639
Test: visual
Change-Id: I91b9f2dc9ffa19ce7b960129256be86eee217e8a
2021-03-19 10:17:31 -07:00
Nader Jawad
a225d21f7d Updated EdgeEffect parameters for overscroll stretch
Added dampening logic to caluclate the distance to
overscroll.
Updated StretchEffect to support independent
maximum stretch amounts for the x/y axis

Removed debugging parameters to configure
stretch distance since they are no longer
used. Removed hidden API calls to configure
stretch distance in ScrollView/HorizontalScrollView

Bug: 179047472
Test: re-ran EdgeEffectTests
Change-Id: I4698669273d364695a21c2cce00ec2cfec41b2cc
2021-03-18 22:41:42 -07:00
Vishnu Nair
947fee291d Remove legacy disable triple buffering config
The config changes the dequeue limit of BQ (setMaxDequeuedBufferCount) from 2 to 1,  decreasing the default size of the queue from (3 to 2).
Some of the motivations behind this change include:
- not applicable in most scenarios since producers in the system override this
- breaks async mode, not well tested in other scenarios
- simplifying some of the implementation and removes a configuration/flag.

Clients can still manually call setMaxDequeuedBufferCount if they wish.

Test: presubmit
Fixes: 182314340
Change-Id: I724218d14ad106a4b7af69f7eacf97fae3c93923
2021-03-16 10:05:52 -07:00
Lucas Dupin
0feb52d5a9 Slow down sparkles and make them more sparse
Sparkles were moving too fast, and were also very dense. They were
looking like TV static.

Test: visual
Bug: 182173639
Change-Id: I9dc1de92e7cc9d56f999a9719f1fae8ff41404c5
2021-03-16 00:37:48 -07:00
Lucas Dupin
b9610108d5 Fix issue where ripple would move
The correct behavior is for the circle to move inside the RenderNode
bounds. The RenderNode itself should not move at all.

Fixes: 182174260
Test: visual
Change-Id: I254138cada2586312530122fcb9ba4518d864cdf
2021-03-15 23:47:58 -07:00
Lucas Dupin
516e54a8a7 Merge "Further shader optimizations" into sc-dev 2021-03-12 16:46:37 +00:00
TreeHugger Robot
0b509e9e12 Merge "Use correct extension based on file contents." into sc-dev 2021-03-12 03:13:56 +00:00
TreeHugger Robot
5774fa63b2 Merge "Expose shared memory related APIs for testing purpose" into sc-dev 2021-03-12 01:38:16 +00:00
Lucas Dupin
916a9c6c10 Further shader optimizations
- Removed unused variable and function
- Made output colors premultiplied

Test: visual
Fixes: 182417605
Change-Id: Ie8caecd08a3cd1a784203ad2e5010fc741ff7f86
2021-03-11 11:18:09 -08:00
Lucas Dupin
10f93838bb Hide ripple style APIs
UX decided that there should only be 1 ripple style in the system.

Bug: 167177623
Test: make
Test: cts
Change-Id: I6483f58d9c8333aad37308a8de903a8f59150870
2021-03-10 20:09:17 -08:00
Seigo Nonaka
991f134df3 Expose shared memory related APIs for testing purpose
Bug: 179697509
Test: atest TypefaceTest
Change-Id: Ie1729574f46d653ce07263581626e0483f1bdd3b
2021-03-10 15:22:49 -08:00
Lucas Dupin
a331c3390f Merge "Update ripple spec" into sc-dev 2021-03-10 19:10:58 +00:00
Jay Aliomer
33efde7884 Update ripple spec
Added new noise function, and general improvements on rendering.

Test: atest RippleDrawableTest
Test: manual
Fixes: 180556929
Fixes: 182172454
Fixes: 182172793
Fixes: 182174746
Change-Id: Ia2701e1438ac17010d5112ed01e296eef3ff4293
2021-03-10 07:40:39 -08:00
Siarhei Vishniakou
6387cdfb91 Merge "Pass actual present time to ViewRootImpl" into sc-dev 2021-03-08 19:44:12 +00:00
Siarhei Vishniakou
f0cf18d3ed Pass actual present time to ViewRootImpl
To measure end-to-end touch latency, we need to report the actual
present time to ViewRootImpl. ViewRootImpl, in turn, will report this
information to InputDispatcher. Finally, InputDispatcher will combine
all known information for a specific input event, and will report this
data to westworld.

In another patch, we will add a new call, 'reportLatencyInfo', to
InputPublisher. This call will allow the app to send this latency data
to InputDispatcher.

Bug: 169866723
Test: printed the input event present times inside ViewRootImpl
Change-Id: Ibd3a2cfeb1a340eb15cd2165071df1f8589634af
2021-03-05 21:42:32 +00:00
Nader Jawad
6f2ee4b4a0 Merge "Wire SKSL based stretch shader to HWUI" into sc-dev 2021-03-05 03:14:55 +00:00
Seigo Nonaka
9040d23fc7 Use correct extension based on file contents.
Bug: 180364535
Test: atest com.android.server.graphics.fonts
Test: atest ApkVerityTest
Test: atest UpdatableSystemFontTest
Test: atest FontManagerTest
Change-Id: Ia0e0822105868e47e7356a120ce20d8bf5d1e106
2021-03-04 12:53:44 -08:00
Seigo Nonaka
b797729b3f Merge "Avoid infinite loop for invalid XML format" into sc-dev 2021-03-04 02:31:25 +00:00
Nader Jawad
6701a6014f Wire SKSL based stretch shader to HWUI
--Ported SKSL based stretch shader from OpenGL prototype
--Hooked up the stretch APIs in RenderNode to the stretch
shader.
--Updated RenderNode layer logic to promote the RenderNode to
a layer if there is a stretch to be applied to it in order
to feed the layer as input to the stretch shader

Bug: 179047472
Test: builds + sample overscroll stretches + updated CTS test
Change-Id: I744ff70099fe251ce07f23d067bf13444a468c08
2021-03-03 14:56:17 -08:00
Leon Scroggins
9d65c12580 Merge "Add comments regarding FILTER_BITMAP_FLAG" into sc-dev 2021-02-26 18:39:51 +00:00
Seigo Nonaka
8ae6cd8c72 Merge "Make Typeface member final" into sc-dev 2021-02-26 06:00:42 +00:00
Seigo Nonaka
fb6ea1e786 Merge "Use currentTimeMillis instead of epoch seconds" into sc-dev 2021-02-26 05:59:58 +00:00
Seigo Nonaka
0c629ddebf Avoid infinite loop for invalid XML format
Bug: 180364777
Test: atest FontListParserTest
Change-Id: I56de88c6b424d84c844dfdc121eea044e1ac6aad
2021-02-25 13:20:03 -08:00
Seigo Nonaka
9537f89a42 Use currentTimeMillis instead of epoch seconds
Bug: 179215598
Test: N/A
Change-Id: I1fc16750c42b0ce5a2206b928fcf153109d56cb4
2021-02-25 12:31:15 -08:00
Leon Scroggins III
2a420c3ac5 Add comments regarding FILTER_BITMAP_FLAG
Fixes: 179934762
Bug: 77949917
Test: make -j docs
Change-Id: I7d831b24877e73ce090d53dc497d749afab6bd7b
2021-02-25 10:57:42 -05:00
Seigo Nonaka
4560edffbe Make Typeface member final
Bug: 179448958
Test: N/A
Change-Id: I577eaf9ae5cf209899381c8807b5400119487296
2021-02-24 17:45:25 -08:00
Siarhei Vishniakou
554afe2691 Merge "Add presentTime to FrameInfo" into sc-dev 2021-02-24 20:38:17 +00:00
John Reck
3b1ded1768 Merge "Wire up SurfaceView stretch effect" into sc-dev 2021-02-22 22:30:29 +00:00
Xin Li
be473bf819 Merge ab/7061308 into stage.
Bug: 180401296
Merged-In: I4bf82035631ccff6d5a6144d6d9b1d203b076851
Change-Id: I1b5f3a672a55eaabba0f5389bab110b395553559
2021-02-21 09:39:53 -08:00
Nader Jawad
28e62f371a Remove unreleased BlurShader API
Remove BlurShader API which was part of the initial
implementation blur that internally mapped between
SkImageFilter and SkShader. Because we migrated
away from this approach to leverage SkImageFilter
directly as part of the RenderEffect API, BlurShader
is no longer applicable and consumers should use
RenderEffect.createBlur instead.

fixes: 180766802
Test: builds
Change-Id: Ibbe6360c66b8e3718cac4516130336f5758cbd3e
2021-02-19 18:44:46 -08:00
Siarhei Vishniakou
4bcbffd584 Add presentTime to FrameInfo
Present time is available to apps, but is not currently stored inside
FrameInfo. In this CL, we add a location for storing the present time inside
FrameInfo.

Currently, the metrics reporter is triggered after the buffer is sent to
SurfaceFlinger. That means, metrics for anything that happens after gpu
draw completes are currently not available.

In a future CL, we will populate the 'presentTime' field.

In a future CL, we will register a metrics observer inside ViewRootImpl
in order to send this data to InputDispatcher. This will enable
end-to-end touch latency metrics collection.

Bug: 169866723
Test: printed present time inside FrameTimeline.cpp (surfaceflinger
side) and compared to the values printed inside a metrics observer
registered in ViewRootImpl (not done in this CL)
Test: atest ViewFrameInfoTest

Change-Id: I7d0f8c5d7b5a2572abdc4e107123e8938a36f582
2021-02-18 22:07:09 +00:00
John Reck
5d53a7540a Wire up SurfaceView stretch effect
Bug: 179047472
Test: StretchySurfaceViewActivity

Change-Id: I7f3d582cc66fb732a557e9332edc6d186db2335c
2021-02-17 15:44:50 -05:00