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 5d123b6775.
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 5d123b6775.
NoNonSdkCheck: b/170729553
Bug: 175939224
Test: m
Change-Id: I277b085b490407bbe1899dd7f4614f51cd9ce36e
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
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
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
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