To avoid static field and synchronization for the mapping, keep source
identifier into native font instance.
Bug: 179113771
Test: minikin_tests
Test: hwui_unit_tests
Test: atest CtsTextTestCases CtsGraphicsTestCases
Change-Id: I238e7b8090ee89101937ec22cbe7c68aea97bcfd
In the ag/13482285, accidentally removed font native allocation.
The native bound instance should be unref-ed when the Java font
object is GC-ed.
Bug: 179942558
Test: N/A
Change-Id: I19312844856f19a2e3abf717a7563a0812c9266d
- Adds task & snapshot sizing info to RecentTaskInfo so that SysUI can
stably layout overview when there are tasks of different sizes
- Removing some unused code
Bug: 179466077
Test: atest WmTests:RecentTasksTest
Change-Id: Idf4c27e2d04380328413459fc537ff8bcc111a14
As HWUI uses vsync id to send buffers to SF, SF applies the right
amount of render ahead by latching the buffers at the configured time.
Test: launch an app and observe systrace
Bug: 178148035
Change-Id: Ifd3e1a2971aad0a085cb35d33e950194046aa634
Added RenderEffect.createShader to handle creation
of RenderEffects using shaders as inputs that can be
chained with other RenderEffects
Fixes: 178536866
Test: Added example in HwAccelerationTest activity
Change-Id: I4d9791ad63f3057ffa528918ce2cd083986089e5
This CL refactors followings:
- Use infomation stored in native instance as the source-of-truth.
- Being able to create Font instance from native instance.
- Use ByteBuffer as a wrapper of the native byte buffer.
Bug: 179113771
Test: atest CtsTextTestCases CtsGraphicsTestCases
Test: atest android.graphics.fonts.NativeSystemFontTest
Test: atest android.graphics.fonts.SystemFontsTest
Test: atest FrameworksCoreTests:android.text
Test: atest FrameworksCoreTests:android.graphics
Change-Id: Icc1df1c76ba78d4f8800984444439fd03970e179
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