Commit Graph

4693 Commits

Author SHA1 Message Date
Mathew Inwood
8e6ce38bde Merge "Derestrict mSurfaceTexture, mProducer." 2021-01-07 09:47:42 +00:00
TreeHugger Robot
8ce762dd9f Merge "Updated RenderEffect documentation" 2021-01-07 02:32:06 +00:00
Nader Jawad
a59368e0fe Updated RenderEffect documentation
-Added documentation on RenderEffect usage
-Updated documentation regarding coordinate space
of dst rect to be within bounds of target
RenderNode
-Updated createBlendModeEffect documentation to
remove references to nullability since the parameters
are required to be non-null

Bug: 173657415
Test: N/A
Change-Id: Ief136650e40d1b820de9e175ac906f87c67ea864
2021-01-06 15:48:28 -08:00
Mathew Inwood
cc42f71234 Derestrict mSurfaceTexture, mProducer.
Usage has been discovered by an app so reverting this to its previous
state. This is conceptually a partial revert of change 5d123b6775.

NoNonSdkCheck: b/170729553

Bug: 176388660
Test: m
Change-Id: I4399e4d431f8a443343de312e131fbf86d0f60b5
2021-01-06 17:51:07 +00:00
Mathew Inwood
d5d9dc6828 Derestrict RippleDrawable.mState.
Usage has been discovered by an app so reverting this to its previous
state. This is conceptually a partial revert of change 5d123b6775.

NoNonSdkCheck: b/170729553

Bug: 175939224
Test: m
Change-Id: I277b085b490407bbe1899dd7f4614f51cd9ce36e
2021-01-06 17:49:09 +00:00
Jeff DeCew
8c59be26f7 Merge "Correct the resource type annotation on Icon.getResId()" 2021-01-05 21:45:56 +00:00
Vishnu Nair
0aa41a85fe Merge SV transactions to VRI BlastBufferQueue
Currently SV with blast sync requests a sync transaction from VRI and
merges its transactions with VRI's sync transaction. This can break if
we are not able to set the request in time.

Instead this change will merge SV transaction from the renderthread to
the VRI BlastBufferQueue specifying the framenumber which the
transaction should be merged with. The transaction will be queued until
we submit a VRI buffer with the requested frame number.

Test: open bubbles with sv blast
Test: atest SurfaceViewSyncTest
Bug: 175594838
Change-Id: I87ba346d782f615bab2e8a692adb2b3c49ef4021
2020-12-28 10:10:56 -08:00
Jeff DeCew
09424eadc4 Correct the resource type annotation on Icon.getResId()
Test: n/a
Fixes: 176106341
Change-Id: Id473e728ad6ce43eff8105c6817a5d52137bc5e9
2020-12-22 15:13:59 -05:00
chaviw
351e9cf9be Handle multiple relayout calls with blast sync
The issue is the following:
1. Call relayout from VRI. drawsNeededToReport = 1
2. SV also will need to be updated. drawsNeedToReport = 2
3. VRI is finished rendering, but SV is not. drawsNeedToReport = 1
4. VRI calls relayout again. drawsNeedToReport = 2
5. SV finishes drawing. drawsNeedToReport = 1

BBQ will get stuck since it's waiting indefinitey for a transaction
callback. The previous transaction can never get applied since we're
still waiting until drawsNeededToReport = 0.

This prevents situations like this from happening since it will not
allow a relayout to get called until the previous transaction has been
applied.

Test: Split screen with chrome
Bug: 167202096
Change-Id: I167a90ef00fa6677b3c55239e74eefb6a1384baf
2020-12-21 16:37:35 -08:00
Kohsuke Yatoh
8e9f60a39a Merge "Do not crash if setSystemFont is called twice." 2020-12-17 05:09:04 +00:00
TreeHugger Robot
65144f2e3d Merge "Updated documentation of VectorDrawable" 2020-12-16 23:15:17 +00:00
TreeHugger Robot
567bb6de1a Merge "Use SkSamplingOptions when creating image-shader" 2020-12-16 18:08:31 +00:00
Leon Scroggins
64eff0b9b4 Merge "Add djsollen and scroggo to graphics OWNERS" am: ccdcfd5f43 am: 1cc6152362 am: aad0a30aa1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1530578

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifd8ddffb0705760491de707325bbf0383f0ea9e9
2020-12-16 15:54:43 +00:00
Leon Scroggins
aad0a30aa1 Merge "Add djsollen and scroggo to graphics OWNERS" am: ccdcfd5f43 am: 1cc6152362
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1530578

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If354c39063b22212c93ae58bb24105da3814c18e
2020-12-16 15:40:39 +00:00
Kohsuke Yatoh
88ae1a2dcc Do not crash if setSystemFont is called twice.
ActivityThread.mBoundApplication has @UnsupportedAppUsage, so apps can
re-send BIND_APPLICATION message with the same AppBindData by using
reflection.

Bug: 174969232
Test: manually tested with the test app in the bug
Change-Id: Ic96d670f6346d9d1373607b4ae6e78b78194a09c
2020-12-15 13:20:46 -08:00
Nader Jawad
b1ecff76c8 Merge "Added View#setRenderEffect API" 2020-12-15 18:37:04 +00:00
Leon Scroggins III
582e862543 Add djsollen and scroggo to graphics OWNERS
Bug: 174932174
Test: None

We are already OWNERS of the native side (libs/hwui), and we are active
in the development of the Java side as wel.

Change-Id: I3727411e0123b80843fc6f936b8b3700c8943825
2020-12-15 11:53:55 -05:00
Adrian Roos
1901cfd916 Merge "Add fonts/OWNERS for font-related files." am: 1ab0fea04b am: c8a88daa25 am: c5f061be72
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1529699

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0be56d133026293b3a4581833335fdf0e418ac91
2020-12-15 11:42:52 +00:00
Adrian Roos
c5f061be72 Merge "Add fonts/OWNERS for font-related files." am: 1ab0fea04b am: c8a88daa25
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1529699

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iffa9b6a2d4ac9b7593096ec718005f51935191ac
2020-12-15 10:23:39 +00:00
Kohsuke Yatoh
3383d0b93b Add fonts/OWNERS for font-related files.
Test: n/a
Change-Id: I98bd4b1c6274e1414c107fd75f08bcd0367ede00
2020-12-15 05:31:26 +00:00
Mike Reed
3ed3089fdb Use SkSamplingOptions when creating image-shader
Test: make

Change-Id: Ie979cdb10263a08ea3d8c817234b94c9b61abb76
2020-12-14 17:51:13 -05:00
Nader Jawad
89f45ca74b Updated documentation of VectorDrawable
Fixed grammatical errors in documentation for VectorDrawable

Fixes: 170729553
Test: N/A
Change-Id: I4dbdb0f9b30c94f1483b9474759264a8601a2ba1
2020-12-14 08:45:27 -08:00
Nader Jawad
8b5c9c6061 Added View#setRenderEffect API
Added View API to configure RenderEffect on the underlying
RenderNode

Bug: 159712515
Test: Added CtsUiRenderingTestCase
Change-Id: Ic64009ac79927d61c7c1f63306ced3da18fce1da
2020-12-11 17:55:17 -08:00
Wale Ogunwale
c27f0525b7 Merge "Add more OWNERS coverages" am: 32ff0144bf am: 60f676c7d6 am: 926aa8da2c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519794

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib3dd38c02eb596d1223ecfae9b383931e985fe6d
2020-12-11 17:15:02 +00:00
Wale Ogunwale
926aa8da2c Merge "Add more OWNERS coverages" am: 32ff0144bf am: 60f676c7d6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519794

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I32e5f8566ba916c892898f3f521a5a4309646142
2020-12-11 16:58:45 +00:00
Charles Chen
09f4e85ac2 Add more OWNERS coverages
Test: manual
Bug: 174932174
Change-Id: Ia798bdbce8516a3d675c55028ab637ad7f0695cf
2020-12-11 19:16:38 +08:00
TreeHugger Robot
f3eda767d7 Merge "Update for API council feedback" 2020-12-10 19:34:54 +00:00
Jeff Sharkey
0ab7007631 resolve merge conflicts of 358f0d4fc8 to master
Bug: 174932174
Test: I solemnly swear I tested this conflict resolution.
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I9262a08ffc1ccede8e519d0eed90ed2bfcf0232c
2020-12-08 11:01:05 -07:00
Jeff Sharkey
24d251403b Improve OWNERS coverage across frameworks/base/. am: fab0ab3c9c am: c7c4a74a78
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519383

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5120a3701af3564f363900b20bca75f3ad2a854c
2020-12-08 16:43:17 +00:00
Jeff Sharkey
fab0ab3c9c Improve OWNERS coverage across frameworks/base/.
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.

Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas.  Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:

-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage

Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance.  With this extensive
effort, we've now improved our coverage as follows:

-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage

This specific change is automatically generated by a script from
detailed ownership information confirmed by team leads.

Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I9789c97c1de8e5d962b48c29c57d82fe83729eba
Change-Id: I9789c97c1de8e5d962b48c29c57d82fe83729eba
2020-12-08 08:36:27 -07:00
Kohsuke Yatoh
6fd7a0c41f Enable lazy typeface initialization.
Bug: 172891184
Test: atest FrameworksCoreTests:TypefaceTest
Test: atest CtsGraphicsTestCases
Test: atest CtsTextTestCases
Test: atest CtsWidgetTestCases
Change-Id: I958c33d40dd3bf510b6bdfe72021bd708eb7fd33
2020-12-03 21:55:20 -08:00
Seigo Nonaka
1aa57ec5c5 Parse fonts.xml when SystemFonts#getAvailableFonts is called
The fonts.xml is no longer parsed once we move to new model.
Thus, need to parse fonts.xml when SystemFonts#getAvailableFonts
is called.

Bug: 173752727
Test: atest NativeSystemFontTest
Change-Id: I628a2586f8450b942caf34ede5dc827e31fff0ef
2020-12-03 20:02:16 -08:00
John Reck
6f4fe2b195 Update for API council feedback
Test: N/A
Fixes: 169331021
Change-Id: I8ae9133d21f177db1a98fa43fde28a3f81820d5f
2020-12-03 16:44:32 -05:00
Seigo Nonaka
3a28205645 Create Font sets from native fonts
Bug: 173752727
Test: atest SystemFontsTest (with enabling LAZY flag)
Change-Id: Ic4e405a68e355919ee6493e51528fd44d79cd48e
2020-12-03 12:19:58 -08:00
TreeHugger Robot
b201a7e0ee Merge "Track per-window information in ViewFrameInfo" 2020-12-02 23:02:57 +00:00
Siarhei Vishniakou
efed16630a Track per-window information in ViewFrameInfo
FrameInfo will now be per-window; that is, per-ViewRootImpl.
Some of the information should remain “global” (it remain in Choreographer),
while some information is going to become ViewRootImpl-specific.
Before the information gets passed to the native layer,
 the ViewRootImpl-specific info will be stitched together
with the general Choreographer info.

This change is useful in order to correctly correlate frames with a specific
input event. In the unlikely scenario of a user touching two windows of the
same app simultaneously, this change will allow us to correctly measure the
latency of both frames produced by the windows.

Design doc: https://docs.google.com/document/d/1KMpMBlOxnl7zkWBCbXZZE6ZlaHEA4efYnN6WYK8n3FE/edit?resourcekey=0-eqooVNP0SskupljlTFvtOQ

Test: atest ViewFrameInfoTest
Bug: 169866723
Change-Id: Ib0bf9cd51cbcc0b9b70460c929c480eb490ec322
2020-12-01 15:07:50 -10:00
Kohsuke Yatoh
b11b963ed1 Prepare switching font loading to system server.
Currently, fonts are loaded in Zygote.
This CL adds a preparation to switch it to system server and
bindApplication(), so that system server will be able to update font map
at runtime.

(1) Zygote will be initialized without fonts.
(2) System server will maintain a serialized font map in ashmem.
(3) Apps will load font map from the ashmem in bindApplication().

The change is guarded by Typeface.ENABLE_LAZY_TYPEFACE_INITIALIZATION,
and the new behavior is disabled by default.
I tested with ENABLE_LAZY_TYPEFACE_INITIALIZATION = true.

Bug: 172891184
Test: atest FrameworksCoreTests:TypefaceTest
Test: atest CtsGraphicsTestCases
Test: atest CtsTextTestCases
Test: atest CtsWidgetTestCases
Change-Id: I40832962a4b27f6160c4dc6268689c52f6a4dd33
2020-12-01 16:05:33 -08:00
Ady Abraham
d90ac7139c Merge "Handle DISPLAY_EVENT_FRAME_RATE_OVERRIDE" 2020-11-23 23:20:48 +00:00
TreeHugger Robot
c826b936b9 Merge "Decouple font collection logic from fallback building logic" 2020-11-23 22:07:30 +00:00
Ady Abraham
15d23d83a7 Handle DISPLAY_EVENT_FRAME_RATE_OVERRIDE
When getting DISPLAY_EVENT_FRAME_RATE_OVERRIDE from SurfaceFlinger,
expose the overridden frame rate to the relevant application
if the current refresh rate allows that.

Bug: 169271059
Bug: 169271062
Bug: 170503758
Test: manual test using SF backdoor
adb shell service call SurfaceFlinger 1039 i32 <uid> f <refresh rate>

Change-Id: I6ae1a98e6ca13e9d3d095a5713a6b0ca99652256
2020-11-23 20:02:48 +00:00
TreeHugger Robot
531245a7e9 Merge "Add perf test for Typeface serialization." 2020-11-21 01:05:22 +00:00
Seigo Nonaka
4823031728 Decouple font collection logic from fallback building logic
Bug: 173752727
Test: atest SystemFontsTest
Change-Id: I87030852a31c48a702becd406a56d7af6a101c48
2020-11-20 16:52:13 -08:00
Kohsuke Yatoh
2309375646 Add perf test for Typeface serialization.
Bug: 172891184
Test: atest TypefaceSerializationPerfTest
Change-Id: I3a0c8ba26350d6ca51a93a458e73362ac23c566f
2020-11-20 11:28:04 -08:00
Seigo Nonaka
4131277bc1 Remove SystemFonts#getSystemFallback and use Typeface instead for fallback
Bug: 173752727
Test: atest CtsTextTestCases
Test: atest CtsGraphicsTestCases
Test: atest TextViewTests
Test: atest TypefaceSystemFallbackTest
Test: atest TypefaceTest
Change-Id: I1c242ef6f651876e83d72fc5620035805fed2475
2020-11-19 19:17:41 -08:00
TreeHugger Robot
3acf806a9e Merge "Add the related tests for Icon in TEST_MAPPING" 2020-11-19 10:14:11 +00:00
Tiger Huang
33ffcac4d4 Merge "Remove legacy frames from WindowFrames and DisplayFrames" 2020-11-18 09:26:46 +00:00
Tiger Huang
b73471b4ec Remove legacy frames from WindowFrames and DisplayFrames
These frames are used for computing the legacy insets which won't be
used anymore. We should only maintain the new insets system now.

This CL also unhides Rect#inset APIs.

Bug: 149813814
Test: atest WindowFrameTests DisplayPolicyLayoutTests InsetsPolicyTest
            SplashscreenTests ManifestLayoutTests WindowMetricsTests
            WindowInsetsAnimationImeTests WindowInsetsControllerTests
            WindowUntrustedTouchTest DisplayContentTests
Change-Id: I06e40be6342b2ae35f7cc3e6f4ebdbe68edf0499
2020-11-18 10:59:15 +08:00
John Reck
2d2bd12935 Merge "Remove SaveFlags from saveLayer(Alpha)" 2020-11-17 21:48:30 +00:00
John Reck
a00eef21de Remove SaveFlags from saveLayer(Alpha)
This has been hardcoded as ALL_SAVE_FLAGS for a couple releases now.

Since it's now permanent behavior, remove the last bit of plumbing
for SaveFlags on saveLayer

Test: builds & boots
Change-Id: Iec92f27199d0b4781c2293dcdcfd45a1562a1b4e
2020-11-16 18:26:08 -05:00
Felka Chang
2547398797 Add the related tests for Icon in TEST_MAPPING
It's necessary to run the following two tests if
android.graphic.drawable.Icon is modified.
* CtsGraphicsTestCases:android.graphics.drawable.cts.IconTest
* FrameworksCoreTests:android.graphics.drawable.IconTest

Test: atest -p framewroks/base/graphics/java/android/graphics/drawable
Test: cd framewroks/base/graphics/java/android/graphics/drawable; \
      atest --enable-file-patterns --collect-tests-only
Bug: 172183870
Change-Id: Ic5bcaf3231ead515aeb2cba5b7f977dbbd41f5a9
2020-11-17 00:49:50 +08:00