SystemFonts and related classes are now aggressively used in system
server. To reduce the memory impact, use ArrayMap/Set instead of
HashMap/Set.
Also, the language tags are duplicated in two places, one in Java and
one in Native object. Remove Java reference.
Bug: 178472803
Test: N/A
Change-Id: Id94b68bd34a1958fda67512dcdc683b20b12003f
Revert "Add permission check for blurs in SurfaceFlinger"
Revert "Remove public usages of FLAG_BLUR_BEHIND"
Revert "Add pid and uid to SF::setClientStateLocked"
Revert "Add USE_BACKGROUND_BLUR to cts expected permissions"
Revert submission 13350963-blur_system_api
Reason for revert: This topic made blurs a system api. API council voted against that and we will instead aim to make it public for S. None of these changes are relevant in that case.
Reverted Changes:
I3683db296:Remove public usages of FLAG_BLUR_BEHIND
I23b21b603:Add USE_BACKGROUND_BLUR to cts expected permission...
Id21f03793:Add pid and uid to SF::setClientStateLocked
If5d8344a5:Add permission for blur SystemApi
I70d1e1715:Add permission check for blurs in SurfaceFlinger
Icf98c3607:Make window background blurs SystemApi
I0b881ec6e:Make BackgroundBlurDrawable a SystemApi
Bug: 177523043
Test: m
Change-Id: Iee4b89b06508c7dc3b7266452bb0b987f8670fac
Merged-In: Iee4b89b06508c7dc3b7266452bb0b987f8670fac
GameManager service is a service to manage game related features. This
patch creates the initial service to manage the game mode and persist
the data across reboot.
Bug: b/174956354
Test: atest GameManagerTests
Test: atest GameManagerServiceTests
Test: atest GameManagerServiceSettingsTests
Change-Id: Iee2ab47c79d29f48847bc6d4b3eb781a5af18ff4
Adds a new attribute to downloadable font xml
that checks if downloaded font is on the system
already and uses that instead.
Test: added new tests
Test: atest ResourcesTest
Test: atest FontResourcesParserTest
Bug: 178589784
Change-Id: Ib7c32ba3037c534e9ab8c144716d68e46c908a39
Bug: 160617841
Test: If6edcada514977c2f08c29927380d35000173dc5
AnimatedImageDrawable.java:
- Override onBoundsChange. Silently do nothing if mNativePtr is 0. This
matches setRepeatCount, setAutoMirrored, and onLayoutDirectionChanged.
While some other methods throw an IllegalStateException, doing nothing
is safer for backwards compatibility.
AnimatedImageDrawable.h:
- Add Properties.mBounds. Putting it here provides a safe way for the UI
thread to change it, like it does for other properties (alpha, color
filter).
- Remove redundant "virtual" modifiers on "override" methods.
hwui/AnimatedImageDrawable.cpp:
- Initialize mStagingProperties.mBounds to use the intrinsic bounds. The
official documentation requires a client of Drawable to call setBounds,
but AnimatedImageDrawable as introduced in P started with the intrinsic
bounds. This ensures we maintain that behavior without special casing a
client that never calls the method.
- Handle the bounds, using a scale and translate
- Update the SkAutoCanvasRestores to save, removing the need to manually
determine whether it's necessary to call save().
- Update onGetBounds to return SkRectMakeLargest. This matches
RenderNodeDrawable and ReorderBarrierDrawables. Since the Drawable may
be updated by a call to setBounds to draw anywhere, this ensures the
bounds always contains the drawing.
jni/AnimatedImageDrawable.cpp:
- Plumb the new bounds to the native object.
Change-Id: If8d7ed51a56e0f64714f15e6041ed883e8ce23f8
FontManager is an interface of communicating with FontManaserService.
With this CL, system apps can know the primitive information about
what font files are installed and how it is configured.
This CL also adds shell command of dumping font configuration.
Example usages are:
# dump primitive font configuration.
adb shell dumpsys font
# dump fallback font list
adb shell cmd font dump serif
Bug: 173619554
Test: atest FontManagerTest
Test: Manually confirmed above commands works.
Change-Id: I5cb855308e199ac38bd7b56b60821346247bdce3
- Updatable font files should have fs-verity enabled.
- PostScript name metadata is checked to detect if files are swapped.
- Font revision metadata is checked to detect if version downgrade
happens.
Bug: 176939176
Test: atest FrameworksServicesTests:UpdatableFontDirTest
Change-Id: Ie59012e17ef4f9db2419db259e0773067ace4120
Ability to specify that 2 root tasks are adjcent there by allowing them
to occlude their parent. Similar to how the legacy primary/secondary
split windowing modes are used to occlude their parent.
Also, occlude parent if a child in multi-window mode as a matching
bounds.
Bug: 177166639
Test: AppConfigurationTests#testSplitscreenPortraitAppOrientationRequests
Change-Id: I7d54bfa188700a76b0bca911d2011123c21553ad
This CL breaks system font initialization step into three sub-steps
to be able to expose font configuration as SystemApi. The font
initialization step is now following three steps:
1. Parse XML files. This is SystemFonts#getSystemFontConfig and
SystemFonts#getSystemPreinstalledFontConfig. The first API gives
you the current FontConfig and the second API gives you plain
vanilla FontConfig without any updates.
2. Build font family fallback list from FontConfig. The font family
fallback is a intermediate state that can be used for custom
Typeface. This state is kept for dumping in shell command later.
This is useful for checking what font will be used by the fallback
since family fallback is still printable.
3. Build typeface mapping. The typeface mapping is the final state to
be used by application. This is no longer printable.
Bug: 173619554
Test: atest TypefaceTest TypefaceSystemFallbackTest StaticLayoutTest
Test: atest CtsGraphicsTestCases CtsTextTestCases
Change-Id: I4e21fc7c41f2fb7975d03c1d5f5536a23e8abb09
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
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
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
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
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
This also adds the ability for RenderThread to animate a few
predefined shader uniforms.
Bug: 177051137
Test: demo in ag/13296877
Change-Id: I6e58e671ad1242a07ecb1cf4cdb48031f85c2088
-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
Usage has been discovered by an app so reverting this to its previous
state. This is conceptually a partial revert of change 5d123b67756.
NoNonSdkCheck: b/170729553
Bug: 176388660
Test: m
Change-Id: I4399e4d431f8a443343de312e131fbf86d0f60b5
Usage has been discovered by an app so reverting this to its previous
state. This is conceptually a partial revert of change 5d123b67756.
NoNonSdkCheck: b/170729553
Bug: 175939224
Test: m
Change-Id: I277b085b490407bbe1899dd7f4614f51cd9ce36e