Introduce a new constant FontStyle.FONT_WEIGHT_UNSPECIFIED = -1, which is used when text weight is not specified. Also replace -1 with it in TextView, TextAppearanceSpan.
Bug: 256995042
Test: manually test
Change-Id: Ia8334f5513cc3e5b7383b67b24b27bf2866d05ad
Should be a mostly no-op but adds a handful of new options
* Adds a 'MemoryPolicy' to mostly consolidate memory settings
* Moves trim handling into HWUI proper
* Adds settings for UI hidden & context destruction that's not
dependent on TRIM signals
* Treats persistent process the same as system_server
* Tweaks HardwareBitmapUploader timeout to reduce churn
Bug: 245565051
Test: builds & boots
Change-Id: I1f1b3db884ef7fa45ff2556436464a99440b998e
Added a new field to get the system font family name of a typeface, together with a public API getSystemFontFamilyName. Modified the constructor method of Typeface.
Test: atest android.graphics.cts.TypefaceTest#testGetSystemFontFamilyName
Bug: 231894524
Change-Id: I3a5d1e724c0984a2a708a21a3876eb64abe3e20b
3fde6cee3c
This is the same CL as the original CL, with the exception that SurfaceView#isZOrderedOnTop checks mRequestedSubLayer, rather than mSubLayer.
This is to fix a CTS failure with InlineContentViewTest#testSetZOrderedOnTop, which set the Z order of an offscreen SurfaceView without binding it to a layout.
Change-Id: Ifdfa710d87f7ea4c333505ffdcc7fbff06245fba
There will be an extension function in the AndroidX version
of this API with the name 'iterator'. Callers of that API
should get the extension version instead, but Kotlin defers
to the actual implementation if it exists. Changing the method
name here (and removing the new implementation of the
Iterable interface) to avoid that collision.
Bug: 223586753
Test: Changed PathIterator cts tests to suit
Change-Id: I30e2c227ddc4fd387a90d72c52c1324c9207a3a7
Need to land this fix in tm-dev for it to show up in the published reference docs.
Bug: 237562620
Test: [go/atsd docs build]
Change-Id: I5f562b70d04bc86779190002a2640fb51dc00531
(cherry picked from commit 0547bffe40)
Basically, this removes an excuse for apps to use TextureView for video
playback or one-off HDR images prior to HDR UI being ready everywhere.
The idea is that for Z-above, applying alpha is easy, because the
surface just needs to be have alpha modulated. Z-below is a little bit
more creative - the alpha is applied to the hole punch and drawn using
DST_OUT blending semantics. This allows for views underneath the
SurfaceView to blend with surface, while being occluded by views on top
of the SurfaceView.
There may need to be some complex view hierarchies that would be useful
to test, but simple view layouts seem to work.
Note that this is guarded with a target SDK check, to defend against
applications that are propagated alpha to child views while expecting
opaque SurfaceViews.
Bug: 241474646
Test: HWAccelerationTest doesn't look broken
Change-Id: Ibc14b18f1ce6f25250318db50275c6b8c972bade
The underlying Skia implementation of Path has APIs for
querying the data in a path (via SkPath::Iter). It also exposes
the ability to add conic sections (conicTo()), which is useful
since a Path can contain conics (even if it was not created with
conics directly). And it adds a method to get the generationId
from a Path, used to see whether a Path changed since the
last time that Id was retrieved. Finally, it exposes a simple
interpolate() function to allow linear interpolation between
two paths.
This CL adds PathIterator to enable querying Path data, and
adds conicTo, isInterpolatable(), and interpolate() to Path,
all of which wrap the underlying, existing Skia functionality.
Bug: 157391114
Bug: 223586753
Test: Added PathIteratorTest plus new tests on PathTest
Change-Id: Iddadfde24dd75ac04d0a2f3ebca767613af25360
The ArrayEquals, ArrayHashCode, ArrayToString, and
ArraysAsListPrimitiveArray errorprone findings were
demoted from errors to warnings. Fix existing
occurrences of them so they can be made errors again.
Bug: 242630963
Test: RUN_ERROR_PRONE=true m javac-check
Change-Id: Ia6f216cc36ad0a5758f39fd9b34962cd4adf9d8e
This is to address the lint error when passing a PixelFormat integer to
ImageReader.newInstance().
Also add the IntDef for YCBCR_P010.
Test: Copy annotations.zip to SDK, and observe no lint error in AS
Bug: 176408464
Change-Id: I224190b5124d6871c4ef04dc5086c6d7c91d4daa
* Mark sameAs @WorkerThread
* Always noteSlowCall #sameAs
* @NonNull all the non-null things
* Styling fixups
Fixes: 219890711
Test: make
Change-Id: Iad220e7e667a5a6c558fc93dfe2eb9df2d7db35d
The optimization has bugs and is of questionable value
given the current state of JNI. Just remove it.
Fixes: 149585703
Test: uirendering CTS, Path graphics test
Change-Id: I613e4854695ae6e4ad9ec8b17be44e856ed03860
Also make it actually async, and allow the bitmap
to be auto-allocated
Bug: 195673633
Test: PixelCopyTest CTS suite
Change-Id: Ie872f20c809eaaeb8dc32f3ec6347f21a9a7bc1a
clipPath is already anti-aliased since Android S, so we do not
need to create extra bitmaps for this
Bug: 211896569
Bug: 238937089
Test: Updated tests / presubmit
Change-Id: I60ce42d91ca96babbde9faa4e5580b00f681de35
This saves ~31 KB per process on oriole.
Bug: 174672300
Test: atest CtsGraphicsTestCases:android.graphics.cts.TypefaceTest
Change-Id: Ic70ea842985a0aca441a31327e41980ed47bc961