This'll help developers decide if they can try decoding an image
file directly, or if they need to convert it to a more general
format first.
Bug: 126276695
Test: atest android.graphics.cts.ImageDecoderTest
Change-Id: I6a404e3be883ac14ac2e6376247d4209f8963908
If they were null, then the Parcelable would fail to work.
Bug: 126726802
Test: manual
Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014
Exempt-From-Owner-Approval: Trivial API annotations
--Added @Px annotations to pixel related parameters in added APIs
--Added @FloatRange annotation to float based APIs
(thickness/inner)Ratio
--Added error checking to invalid ratio arguments to
set(Thickness/Inner)ratio
Bug: 126375868
Bug: 126701500
Test: Added CTS tests to verify parameter validation logic
Change-Id: I8ca70f38edd18f68c168d4d6e2c93bcb9b64c488
Bug: 126700762
Test: None
This method will never return null. It will either throw an Exception or
return the Color at the specified location. Update the annotation to
make that explicit.
Change-Id: I276c0f84eac030758714b6736da29a7fdc175b7c
Allow views to register a list of rects where the device's system UI
should not intercept complex (read: down+move+up) gestures on specific
sub-regions of the view. This should not be used for large-scale,
full-view gesture recognition such as scrolling, but rather for specific
areas such as SeekBar's scroll thumb or DrawerLayout's edge strip for
swiping open a navigation drawer.
Add ability for ViewTreeObserver to observe transformed exclusion rects
Bug: 126360272
Test: atest android.view.cts.SystemGestureExclusionRectsTest
Change-Id: If89b6f66637e40efa12955d6408f6e37b25cb46f
Bug: 28039105
Test: Iaeee40de42c46819558729c792ad36a74265cf61
Skia already supports this, so just remove the silent failure on
hardware Canvases.
Change-Id: I2ccd508e6f42ace57bbee9af5852e2daa1f25105
Bug: 123301872
Bug: 117601185
Test: Manual (Ie18811ba29a1db163aca08472b04ae185e9344f0)
Test: CTS (Ie4b0a232effc67ab7a7fc6070302c722177cadfa)
Test: Infeasible (verify desired ColorSpace is used)
When calling setTargetColorSpace on an ImageDecoder for an animated
image, pass this to the AnimatedImageDrawable. Also respect an EXTENDED
ColorSpace as a cue to decode to RGBA_F16, as with Bitmaps.
Call ImageDecoder#checkState for AnimatedImageDrawables, as with
Bitmaps.
Change-Id: I5f6e11ee14ce4477bfedf2d1fdde8e15ed5f24d5
This is to avoid framework crash when application used
the recycled bitmap memory in createBitmap.
Bug:123656975
Change-Id: I98f93ce48c7bc91913d0b31bca1dc0a10eb319d7
This CL should fix application startup regression for Vulkan
detected by "Hermetic Startup: EmptyActivity" test.
EGL drivers are loaded in a temp thread to leave more time
in RenderThread for other work. Loading EGL drivers
on the RenderThread may cause a perf regression.
Test: Ran cold-dropcache-test test.
Bug: 122659224
Bug: 123361175
Change-Id: I8ca818e98fac196a41d079be15594caca5cb1bab
Bug: 117601185
Test: I5e5bc6b73d5d27ae30f00507d59896008d4cf364
ImageDecoder does not have a way to request decoding to F16 on 8 bit
images, but it does have a way to request an EXTENDED ColorSpace. Treat
that as a request to use a higher bit depth. This matches how we match
EXTENDED to F16 in other cases (createBitmap, Bitmap#copy, etc).
Change-Id: I3d31b13b56bb57a23b47ffcb2eaba11c53e0b8d9
Updated ImageDecoder InputStreamSource to always respect the given
inputDensity regardless if the provided resource class is null
or not.
Fixes: 115836404
Test: AI8dcdc764a963e95d6c0ad644a1e05f055c748c75 Added CTS test to
verify intrinsic bounds of resolved Drawable respects display density
Change-Id: I54e5835a8bceea9c991972ff7f106dbed29b6662
Bug: 121001670
Test: Only a documentation change.
Since Ied0426f6deff354df5998691703a18ddd33ccd3d, we no longer always
apply the ColorSpace to the copy.
Change-Id: I67f486e5c69abb2dd767ac3f1b0da515f9f20e69
Bug: 123377741
Bug: 120870651
Bug: 121001670
Bug: 123374456
Bug: 124052364
Test: I90adb511c8fdefe016028da4fd53b079d8367bf6
RGBA_F16 is no longer restricted to particular ColorSpaces. (Previously,
it was LINEAR_EXTENDED_SRGB when decoded, and EXTENDED_SRGB when
created.) Instead, F16 is now EXTENDED if there is an EXTENDED variant,
but is otherwise not special. It defaults to SRGB (but EXTENDED), but
can be created or decoded to other ColorSpaces.
Likewise, smaller Configs use the non-EXTENDED variant, when the
EXTENDED variant was requested.
ALPHA_8 always has a null ColorSpace.
Add TransferParameters to EXTENDED_SRGB. This seems to be a relic from a
time before Skia treated SkColorSpaces as non-bounded. Make it have the
same parameters as SRGB, so that it can be used in native code. e.g. now
we can draw to/from it.
Fix a bug getting the ColorSpace for gray image. ImageDecoder's info
previously reported that a gray image's ColorSpace is null. (Though it
correctly decoded it with the proper ColorSpace.)
Allow setColorSpace to request SRGB on an EXTENDED_SRGB F16 Bitmap. (It
has no visible effect.)
Do *not* allow setting a ColorSpace on an ALPHA_8 Bitmap (throw an
Exception). Other attempts to create a Bitmap with ALPHA_8 and a
non-null ColorSpace silently use null, for backwards compatibility.
Copying *from* an ALPHA_8 to another Config returns a Bitmap with SRGB.
Change-Id: Ied0426f6deff354df5998691703a18ddd33ccd3d