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
Introduced RenderEffect API to handle consuming
SkImageFilter parameters on RenderNode objects
in order to support blur.
Updated SilkFX demo to use RenderEffect
APIs on RenderNode instead of BlurShader
Bug: 168549524
Test: Added tests to RenderNode CTS test cases
Change-Id: I5005a322a6d75438dd104e6915630264406cf771
TextShaper API provides a primitive text layout result, e.g. what glyph is used etc.
Here is the new APIs and its description
- PositionedGlyphs
This is a native instance backed object that gives layout information to developers.
- GlyphStyle
The glyph style is an object that holds the parameters that will be used for drawing.
This object is a subset of the Paint object for avoiding creating lots of Paint copy.
- TextShaper#shapeText
This does a text shaping and gives TextShaper.Result. This is a native backed primitive
shaping API.
- StyledTextShaper
This is a text shaper for a styled text. This will be the top-level developer facing
API for shaping text.
Bug: 168048923
Test: atest FontTest TextShaperTest StyledTextShaperTest
Change-Id: I2e91d1ef8503b25b28efc94da7de7cad49c4c1a9
In Android 12, vkEnumerateInstanceVersion is made to trigger driver
loading and the api itself neither has extra overhead nor talk to the
driver. So this change uses vkEnumerateInstanceVersion to preload
Vulkan driver in Zygote.
Bug: 135536511
Test: atest CtsUiRenderingTestCases all pass on GL backend
Test: atest CtsUiRenderingTestCases no regression on VK backend
Change-Id: I5017b922843aadc2c4a4237711b8011857703129
Bug: 155905258
Test: make and boot
It is tightly integrated with android.graphics.HardwareRenderer, and
this follows on I30d34055b6870dc1039f190a88f4a747cee17300, which moved
the native component into android_graphics_TextureLayer.cpp, and
Ifa044281a3c36cbc1b413175711e9b172cda640f, which registers its JNI along
with other graphics classes.
Make TextureLayer AutoCloseable, replacing destroy() with close(). Add
annotations where appropriate.
Change-Id: I1b146ff02a20751246636144c88fe6f8eec43514
AndroidBitmap_unlockPixels is the only way to release the ref on
pixels acquired using AndroidBitmap_lockPixels. Apps that lock an
immutable bitmap therefore are forced to call unlock pixels. Prior
to this CL the unlock would update the GenID of the bitmap and also
print a warning that the app was modifying an immutable bitmap. After
this CL the bitmap's GenID will not be updated and no warning will be
printed.
As a result, apps that were using the NDK to allow them to mutate
immutable bitmaps will break without getting a warning message.
Test: hwui_unit_tests
Bug: 150823341
Change-Id: Ie5e5cf86a7a83d53c179c9b3cf9be1a0566cfd93
The graphics JNI code is now separate from libandroid_runtime
and it along with HWUI headers are no longer visible to targets
outside the boundary of what is to become the UI mainline module
The exposed headers to targets outside the module are now restriced
to C APIs contained in the apex header directory.
Bug: 137655431
Test: CtsUiRenderingTestCases
Change-Id: I30d34055b6870dc1039f190a88f4a747cee17300