Exposed skMesh through Mesh API, utilizing makeVertexBuffer,
makeIndexBuffer, make, and makeIndexed. Uniforms are set through
set<>Uniform methods, where the native mesh will then be updated upon
each call to set<>Uniform.
Bug: b/254354591
Test: built hwui
Change-Id: Ia100f00a1e29198e30dfd25999f8bd8db9fb3ca0
The test module would crash with SEGV_MAPERR if the following events
happen in order:
(1) Typeface#deserializeFontMap(ByteBuffer, Map<String, Typeface>)
(also a @TestApi) is called.
(2) The ByteBuffer passed to deserializeFontMap is GC-ed.
(3) The Typeface objects generated by deserializeFontMap are GC-ed.
This is because Typeface reads the buffer in its native object
destructor after
commit 88e387449b3f477a4cde31127cee5c63f332999c
This crash won't happen in production, because the buffer will never be
released.
To prevent the crash in tests, we must release Typeface objects
manually before (2) happens.
Bug: 255798098
Test: atest CtsGraphicsTestCases
Change-Id: If4426beb9a0dcefde317e6a01b4de9bf3fa4c951
Exposed SkMeshSpecification through MeshSpecification, exposing Make
methods as well as constructing a Attribute and Varying data classes.
Bug: b/254354404
Test: build hwui
Change-Id: I1040bde091575ac4bb786f7600d016b7c9168831
Send a load reset hint hint to DrawFrameTask through ThreadedRenderer
from ViewRootImpl whenever Choreographer registers a callback. This
allows the PowerHAL to allocate more resources for HWUI in response to
upcoming work, helping prevent frame drop.
Bug: b/243938267
Test: manual
Change-Id: Ie2cf809cf85530af04f4d0db3407853d4da03d62
- Implement OverlayProperties JNI class
- Call getOverlaySupport() on Diaplay Manager. Inside, provide
SurfaceControl#getOverlaySupport api to call AIDL function in the back
end.
Bug: 242588489
Test: build and flash
Change-Id: I23819d21063cd191a06d92295af2be9132bfe1df
This commit is part of a large scale change to fix errorprone
errors that have been downgraded to warnings in the android
source tree, so that they can be promoted to errors again.
The full list of changes include the following, but not all
will be present in any one individual commit:
BadAnnotationImplementation
BadShiftAmount
BanJNDI
BoxedPrimitiveEquality
ComparableType
ComplexBooleanConstant
CollectionToArraySafeParameter
ConditionalExpressionNumericPromotion
DangerousLiteralNull
DoubleBraceInitialization
DurationFrom
DurationTemporalUnit
EmptyTopLevelDeclaration
EqualsNull
EqualsReference
FormatString
FromTemporalAccessor
GetClassOnAnnotation
GetClassOnClass
HashtableContains
IdentityBinaryExpression
IdentityHashMapBoxing
InstantTemporalUnit
InvalidTimeZoneID
InvalidZoneId
IsInstanceIncompatibleType
JUnitParameterMethodNotFound
LockOnBoxedPrimitive
MathRoundIntLong
MislabeledAndroidString
MisusedDayOfYear
MissingSuperCall
MisusedWeekYear
ModifyingCollectionWithItself
NoCanIgnoreReturnValueOnClasses
NonRuntimeAnnotation
NullableOnContainingClass
NullTernary
OverridesJavaxInjectableMethod
ParcelableCreator
PeriodFrom
PreconditionsInvalidPlaceholder
ProtoBuilderReturnValueIgnored
ProtoFieldNullComparison
RandomModInteger
RectIntersectReturnValueIgnored
ReturnValueIgnored
SelfAssignment
SelfComparison
SelfEquals
SizeGreaterThanOrEqualsZero
StringBuilderInitWithChar
TreeToString
TryFailThrowable
UnnecessaryCheckNotNull
UnusedCollectionModifiedInPlace
XorPower
See https://errorprone.info/bugpatterns for more
information on the checks.
Bug: 253827323
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I8446f9076a45ebf7e7ffa06cb0d4ddb1001b6c00
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