Commit Graph

4464 Commits

Author SHA1 Message Date
Galia Peycheva
42f19b6163 Make BackgroundBlurDrawable a SystemApi
Bug: 177524486
Test: check that using the drawable in the PermissionController works

Change-Id: I0b881ec6e9a41c5aed3ca17589a6d66ced0539bf
2021-01-19 13:50:53 +01:00
TreeHugger Robot
0ce28292cd Merge "Add helper class to read/write updatable font dir." 2021-01-16 03:05:06 +00:00
Alec Mouri
d3ef461fcd Merge "Remove Point#dump" 2021-01-15 23:24:03 +00:00
Kohsuke Yatoh
77c955268f Add helper class to read/write updatable font dir.
Bug: 173619554
Test: atest FrameworksCoreTests:TypefaceSystemFallbackTest
Test: atest FrameworksServicesTests:UpdatableFontDirTest
Change-Id: I950ed71a14d536eaeba5ab754a6c56a637b97217
2021-01-15 14:06:05 -08:00
TreeHugger Robot
106f1b33b4 Merge "Refactor RuntimeShader to support easier assignment of uniforms." 2021-01-15 20:16:55 +00:00
Derek Sollenberger
783e5aeb2e Refactor RuntimeShader to support easier assignment of uniforms.
uniforms are no longer set as single block of bytes where the caller
has to know the offset, but instead by the string identfier in the
shader.  This CL only supports floats, but future expansions of this
will provide helpers for ints, colors, and byte[].

Also by storing the shaders and uniforms in the RuntimeShaderBuilder
we can more easily copy them.  This enables Canvas.drawRipple to not
just copy the compiled SkSL effect, but also all the uniforms and
other input shaders set on the RuntimeShader.

Bug: 177051137
Test: HwAccelerationTest
Change-Id: I4733f42ba662546be6bebc37f0b89832778e66ce
2021-01-15 13:03:25 -05:00
chaviw
41117a4be7 Remove preserve surfaces when surface format changes.
When format is changed, there's no need to preserve surfaces. We can
just update the consumer to use the new format. There shouldn't be any
issues since the next dequeue will get a buffer with the new format. The
current buffer on screen won't change and the layer properties aren't changed
when format is updated. There's no need to recreate a new surface.

Instead, move the format updating logic to the client in VRI and send
the new format to BLASTBufferQueue so it can update the consumer.

Test: go/wm-smoke
Bug: 177557720
Change-Id: I26806cfd4b482e8b6165045f4af3c55a5955da0c
2021-01-15 09:36:09 -08:00
TreeHugger Robot
c1c9ca965c Merge "Add PostScript name and font revision retrival method" 2021-01-15 00:16:55 +00:00
John Reck
f0b5b1a076 Merge changes I1d7806aa,Ie906e628,Idf5a4acc
* changes:
  Convert DisplayList to a value-type wrapper
  Remove forward-decleration of SkiaDisplayList
  Avoid DisplayList* hitting the JNI layer
2021-01-14 18:02:57 +00:00
Seigo Nonaka
47b6c1bc2a Add PostScript name and font revision retrival method
Bug: 176939176
Test: Manually done (will add in subsequent CL.)
Change-Id: I2acbec7ee4362a91c1e6b3b765894106775ef2c4
2021-01-13 19:37:39 -08:00
John Reck
dc1a696f7c Avoid DisplayList* hitting the JNI layer
Keep the actual display list type internal to HWUI/native
avoids requiring that the recording type fits in a jlong

aka, opens up a usage of value types here instead

Test: boots
Change-Id: Idf5a4acc7dbcb61e6742a6bf6369bd351f595be4
2021-01-12 13:57:23 -05:00
Alec Mouri
f2d993ae93 Remove Point#dump
This is in response to API feedback - dump() methods for most of the
public classes describe complex internal state, which does not fit for
the Point class. Point#dump does not need to exist anyways, because
1. Point#toString exists, and
2. Point#dump only printed out the x,y coordinates, which are already
part of the public api, so printing out a more concise string
representation is trivial.

So, this patch removes Point#dump and just has RemoteAnimationTarget
implement its own print method for Point, since it was the only caller.

Bug: 159683987
Test: builds
Change-Id: I5c947330768b3e4e450eba3971de939a904d30d4
2021-01-11 17:38:19 -08:00
Kohsuke Yatoh
87036d61ec Check updatable font dir in FontListParser.
If updatable font dir is provided by caller and fonts exist in the dir,
FontListParser will use the updated fonts.
Currently, updatable font dir is used only in test.

Bug: 173619554
Test: atest TypefaceSystemFallbackTest
Change-Id: I631764fe235d258b6b5cb6d6906c17d48c7e4608
2021-01-11 16:11:53 +00:00
TreeHugger Robot
a6a7ea7ed2 Merge "Initial framework needed to draw circle with RuntimeShader." 2021-01-08 15:42:48 +00:00
Derek Sollenberger
df301aaa54 Initial framework needed to draw circle with RuntimeShader.
This also adds the ability for RenderThread to animate a few
predefined shader uniforms.

Bug: 177051137
Test: demo in ag/13296877
Change-Id: I6e58e671ad1242a07ecb1cf4cdb48031f85c2088
2021-01-08 12:47:31 +00:00
Mathew Inwood
7840d20929 Merge "Derestrict mSurfaceTexture, mProducer." am: 8e6ce38bde am: c1dbf374d0 am: 83b6163810
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1541665

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iea731e7ccdea5bc8618bbed1e206f9a07b2a6e3c
2021-01-07 12:26:28 +00:00
Mathew Inwood
83b6163810 Merge "Derestrict mSurfaceTexture, mProducer." am: 8e6ce38bde am: c1dbf374d0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1541665

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie3321c80292eada053fa4ef3319d9d3555fee3e6
2021-01-07 11:47:32 +00:00
Mathew Inwood
2702a6662d Merge "Derestrict RippleDrawable.mState." am: b698722956 am: f11b14dfe0 am: 6d1ff42ee6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1541666

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I370ce36e69b1daf56762eb2184ff780ff77e862b
2021-01-07 11:12:55 +00:00
Mathew Inwood
6d1ff42ee6 Merge "Derestrict RippleDrawable.mState." am: b698722956 am: f11b14dfe0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1541666

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If77c45731d85f983573da7f05dcc1fd912a2be9c
2021-01-07 10:51:44 +00:00
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