Commit Graph

10895 Commits

Author SHA1 Message Date
Mike Reed
57f23bf31b opt into m44 concat
Test: make

Change-Id: I2b19ba2192d8dc3dfe47186a397c038d33122a71
2020-04-18 11:26:06 -04:00
TreeHugger Robot
0ed90ef8dd Merge "Plumb display density to HWUI through ActivityThread." 2020-04-16 21:21:03 +00:00
Alec Mouri
d5fa1dcff5 Plumb display density to HWUI through ActivityThread.
Whenever an activity's configuration is updated, then tell
HardwareRenderer about it. That way, visualizating frame info does not
need to learn the display density from SurfaceFlinger, which reduces the
native-side api surface for displays.

For now, this method is kept hidden and will be stabilized when
HardwareRenderer's apis are stabilized for Mainline inclusion.

Bug: 146387012
Test: boots, builds
Test: jank visualizer
Change-Id: I51d2964bb78882516ebdff05b80819814894bdce
2020-04-15 14:55:59 -07:00
TreeHugger Robot
2363b49590 Merge "Remove unecessary exported symbols from libhwui.so" 2020-04-14 16:26:37 +00:00
Derek Sollenberger
5937e70744 Merge "Create a version_script to explicitly define exported symbols for libhwui" 2020-04-13 19:57:28 +00:00
John Reck
61d303f125 Merge "Restore bitmap mutability across parceling" 2020-04-13 16:13:39 +00:00
Ryan Mitchell
2705d79a8d Merge "Fail install when resources.arsc is compressed" into rvc-dev am: b8a61d13c2 am: f1c7db061e am: 2f5b31db3b am: 7938d9d122
Change-Id: Iffb9c5a44fef1001f4c0da332a0397eac0e3bdf0
2020-04-13 16:08:22 +00:00
Ryan Mitchell
2f5b31db3b Merge "Fail install when resources.arsc is compressed" into rvc-dev am: b8a61d13c2 am: f1c7db061e
Change-Id: Iee221bc5dc6e8870468d4cc1d9801a21e48d3e7a
2020-04-13 15:30:54 +00:00
Ryan Mitchell
b8a61d13c2 Merge "Fail install when resources.arsc is compressed" into rvc-dev 2020-04-13 14:57:19 +00:00
John Reck
6a93b4fc9c Restore bitmap mutability across parceling
Bug: 150836900
Test: CTS test BitmapTest#testWriteToParcelPreserveMutability
Change-Id: I133047acfccae7af81199098caaf20ea8d641a89
2020-04-10 17:12:00 -07:00
Ryan Mitchell
591263c2c9 Merge changes from topic "invalidate_idmap" into rvc-dev am: 6cb79cdfb7 am: 7cfbff64eb am: 3c0b8da2c1 am: 14ecb445e0
Change-Id: Iff2ec5111ca814c5eab122e9834c1dcc87f191ff
2020-04-10 17:08:18 +00:00
Ryan Mitchell
3c0b8da2c1 Merge changes from topic "invalidate_idmap" into rvc-dev am: 6cb79cdfb7 am: 7cfbff64eb
Change-Id: Ief1e732e3b18738c5c0f62f2fe8c47f66169c85b
2020-04-10 16:17:25 +00:00
Orion Hodson
069b35907c Remove unnecessary jni.h includes from PathParser.{h,cpp}
Part of removing implicit include paths for jni.h from soong.

Bug: 152482542
Test: m checkbuild
Change-Id: Icb27c565b4a2e70c3169bca117256e1ec1706d7d
2020-04-10 07:49:15 +01:00
Derek Sollenberger
3fedf5a7e2 Remove unecessary exported symbols from libhwui.so
Test: compiles and links
Bug: 150782769
Change-Id: Ib49c1bf914b6bfaad1fb29371115df7c9eec08d2
2020-04-09 14:26:16 -04:00
Derek Sollenberger
2c5d63439e Create a version_script to explicitly define exported symbols for libhwui
The linker script defines both the C and C++ headers exported by libhwui
and libskia (included via whole_static_libs).  Reducing the surface
area makes it clear what libhwui's external dependencies are as well
as reducing the binary size by about ~12% (1.04 MB on 64-bit and 789KB
on 32-bit builds for the Pixel 3a in userdebug).

Test: compiles and links
Bug: 150782769
Change-Id: Ia202a12c1605c851c52d953f0db0f4814ade8dfd
2020-04-09 14:25:53 -04:00
Ryan Mitchell
192400cf33 Fail install when resources.arsc is compressed
If an application targets R+, prevent the application from being
installed if the app has a compressed resources.arsc or if the
resources.arsc is not aligned on a 4-byte boundary. Resources tables
that cannot be memory mapped have to be read into a buffer in RAM
and exert unnecessary memory pressure on the system.

Bug: 132742131
Test: manual (adding CTS tests)
Change-Id: Ieef764c87643863de24531fac12cc520fe6d90d0
2020-04-09 11:01:54 -07:00
Ryan Mitchell
a90930528d Invalidate idmap when target updates
When the target package update, check if the idmap file must change.
If so, propagate the idmap changes to the targets overlay paths, and
invalidate cached overlay ApkAssets in ResourcesManager.

Bug: 147794117
Bug: 150877400
Test: OverlayRemountedTest
Test: libandroidfw_tests
Change-Id: I6115c30bae3672b188a5ff270720a0eea15b43b5
2020-04-07 12:14:51 -07:00
TreeHugger Robot
635eb5df4d Merge "Don't reset the capture mode after each frame when using the CallbackAPI" into rvc-dev am: 5d3fc109ec am: 96803c27ad am: 7bc7a10fc0 am: d01631829e
Change-Id: I27fc7eaa55336607d6664b0da5f3f0a8f6c1f99a
2020-04-07 17:43:19 +00:00
TreeHugger Robot
96803c27ad Merge "Don't reset the capture mode after each frame when using the CallbackAPI" into rvc-dev am: 5d3fc109ec
Change-Id: I7feb37ac52dcf074e548c5950520777f28a23f54
2020-04-07 17:20:50 +00:00
TreeHugger Robot
5d3fc109ec Merge "Don't reset the capture mode after each frame when using the CallbackAPI" into rvc-dev 2020-04-07 17:04:49 +00:00
Derek Sollenberger
5f9753d770 Don't reset the capture mode after each frame when using the CallbackAPI
When multiframe skp support was introduced it set the capture mode to
none for everything but the multiframe use case. This was incorrect in
the case of the CallbackAPI where we want to continue to capture frames.

Bug: 152084866
Test: hwui_unit_tests
Change-Id: I7e3caf41a3725d03252df1ab7bedfe1b69a238c2
2020-04-07 11:26:52 -04:00
Automerger Merge Worker
ff80d0ec95 Merge "Merge "Don't update the genID for an immutable bitmap" into rvc-dev am: 10dd5e9a18 am: e9f550649f" into rvc-d1-dev-plus-aosp am: 848a36f78f am: 934dc9ec1f
Change-Id: I15e75e79c1d64d6de976fd314f18422e8bdf1df1
2020-04-07 14:25:53 +00:00
Leon Scroggins
059bebf77a Merge "Switch get_env_or_die to requireEnv" into rvc-dev am: b1dfb8e575 am: 44bc63016b am: 761fdfe1fa am: 1523435934
Change-Id: I98ed1221d28b23762016791345c9df9fc8ad05d9
2020-04-07 14:24:27 +00:00
TreeHugger Robot
5178a2ef42 Merge "Don't update the genID for an immutable bitmap" into rvc-dev am: 10dd5e9a18 am: e9f550649f
Change-Id: I2599623f2540eaab27deed0135fd997f3dc8c873
2020-04-07 13:56:05 +00:00
Leon Scroggins
761fdfe1fa Merge "Switch get_env_or_die to requireEnv" into rvc-dev am: b1dfb8e575 am: 44bc63016b
Change-Id: I9f085ba7d8f23b6e8e7990ee929ab802e53d6c2d
2020-04-07 13:55:08 +00:00
TreeHugger Robot
df8afda623 Merge "Don't update the genID for an immutable bitmap" into rvc-dev am: 10dd5e9a18
Change-Id: I54d13f204587340eac67775212811f4b4b344c43
2020-04-07 13:54:55 +00:00
TreeHugger Robot
10dd5e9a18 Merge "Don't update the genID for an immutable bitmap" into rvc-dev 2020-04-07 13:46:17 +00:00
Leon Scroggins
63b3c143ac Merge "Switch get_env_or_die to requireEnv" into rvc-dev am: b1dfb8e575
Change-Id: I238a70ad499571e29587395925d90210708994b6
2020-04-07 13:39:02 +00:00
Leon Scroggins III
f97b29d2e3 Switch get_env_or_die to requireEnv
Fixes: 153099745
Test: manual

The heif decoder may need to continue reading the input from a
JavaInputStreamAdaptor on the AnimatedImageThread. Attach the JVM like
we do for ByteBufferStream and ByteArrayStream.

Similarly, if the AnimatedImageThread is holding a reference to an
AnimatedImageDrawable, it is possible to call its destructor, and
ultimately InvokeListener's destructor or ByteBufferStreamAdaptor's
release_proc on that thread without the JVM attached. Attach in that
case, too.

Change-Id: I84d236eed2fb5c8617533aed0cae4c762d1eb6dd
2020-04-06 21:11:37 +00:00
Mike Reed
ef06a087ed concat44 is deprecated -- use concat
Test: make

Change-Id: If92f8c1c1d2cd5d5aeb6e2b4e44a25d361cce97b
2020-04-06 17:09:22 -04:00
Derek Sollenberger
d3e9eecf5b Don't update the genID for an immutable bitmap
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
2020-04-06 20:26:49 +00:00
Tianjie Xu
989bca066d Merge "Change the parameter type of offset in read" am: 74a5df06af am: eead9e3eda am: b2415d3b32 am: 922228afb8 am: 372c8554fd
Change-Id: I703ac12e58fbe602ce57f82c21fb014708b57eb3
2020-04-04 21:33:50 +00:00
Tianjie Xu
b2415d3b32 Merge "Change the parameter type of offset in read" am: 74a5df06af am: eead9e3eda
Change-Id: I4ad529b54e83421488d341d8f25def5d1cc2df54
2020-04-04 20:39:31 +00:00
Ryan Mitchell
3c75f0f529 Merge "Begin moving FrameworkResourceLoaderTest to cts" into rvc-dev am: 1b922d56c0 am: 2f75830e44 am: cd215aa9e3 am: 4f76d2ef62
Change-Id: I81acba05bae15f952073f1db76acb4713ca88841
2020-04-03 16:59:12 +00:00
Ryan Mitchell
cd215aa9e3 Merge "Begin moving FrameworkResourceLoaderTest to cts" into rvc-dev am: 1b922d56c0 am: 2f75830e44
Change-Id: I2d90af7de9b0f58612c7a73d5b0b3f2fa4ba9fd5
2020-04-03 16:27:18 +00:00
Ryan Mitchell
d856e14c8d Merge "Begin moving FrameworkResourceLoaderTest to cts" into rvc-dev am: 1b922d56c0
Change-Id: Ia9e28c0697da0f848c9e1996b345e3b18f8ae9b6
2020-04-03 16:09:59 +00:00
Ryan Mitchell
1b922d56c0 Merge "Begin moving FrameworkResourceLoaderTest to cts" into rvc-dev 2020-04-03 16:03:24 +00:00
TreeHugger Robot
d97f949d40 Merge "AImageDecoder: Suppress log messages" into rvc-dev am: 0a5b54560d am: ddc948b4c1 am: eca013d418 am: 258daa962e
Change-Id: I43522ad4cb818303e4f7801197517c45144aabb7
2020-04-03 15:33:24 +00:00
TreeHugger Robot
eca013d418 Merge "AImageDecoder: Suppress log messages" into rvc-dev am: 0a5b54560d am: ddc948b4c1
Change-Id: I31c2b06a4f586b0d8d601063fb3776459129ade5
2020-04-03 15:18:16 +00:00
TreeHugger Robot
3b2288dd2f Merge "AImageDecoder: Suppress log messages" into rvc-dev am: 0a5b54560d
Change-Id: Iff0114dcd3099b729cce77d7735341263d08c118
2020-04-03 15:17:01 +00:00
Leon Scroggins III
f889444fa9 AImageDecoder: Suppress log messages
Bug: 153071768
Test: AImageDecoderTest

For simplicity, I1aff544e8d6932b9ed0931a00da66a0aba6cd536 made
ImageDecoder skip specifying kOpaque when setting the SkImageInfo for
decoding. For some formats (e.g. jpeg and heif), this results in a log
message:

"Warning: an opaque image should be decoded as opaque - it is being
 decoded as non-opaque, which will draw slower"

This isn't relevant to AImageDecoder, which doesn't let you specify
kOpaque or not (since the intent is not to create an SkBitmap for Skia).

Now that ImageDecoder specifies kOpaque properly, the JNI code no longer
needs to correct it.

Replace another opacity check with ::opaque() for simplicity.

Change-Id: I7c270d9b9db61a61a338f40b056ce5d23a56e14d
2020-04-02 16:01:52 +00:00
Tianjie
01ae3f4157 Change the parameter type of offset in read
As we support zip64 in libziparchive, we change the parameter of
the ReadAtOffset() in zip reader from uin32_t to off64_t. So the
derived class needs to be updated as well.

Bug: 150900468
Test: build
Change-Id: Icbfd2dd54b01ff62da988ba8598c1057f9bb6368
2020-04-02 06:16:21 +00:00
Ryan Mitchell
199b09a1a7 Begin moving FrameworkResourceLoaderTest to cts
This changes removes FrameworkResourceLoaderTest from frameworks/base
before it is moved to CTS.

Bug: 152979463
Test: atest CtsResourcesLoaderTest
Change-Id: I4b899564ab93472cb6d2a5ed0917026753c2827f
2020-04-01 20:09:29 +00:00
Brian Osman
e3b9a12fea Include SkVertices.h in SkiaCanvas.h
Test: Adding IWYU header. It still builds.
Change-Id: I40df22a18fef960259b144d491f0c2f794d159b6
2020-04-01 12:25:21 -04:00
TreeHugger Robot
8b86543abf Merge "Use ANDROID_get_native_client_buffer in HWUI" 2020-03-31 21:50:06 +00:00
Alec Mouri
70463a6583 Use ANDROID_get_native_client_buffer in HWUI
ReliableSurface still needs AHardwareBuffer_to_ANativeWindowBuffer to
safely convert to an ANativeWindowBuffer to interop with the
interception methods, but when converting to EGLClientBuffer the EGL
extension should be used instead.

Bug: 152802621
Test: builds, boots
Change-Id: I49cfeee4d7e5d4e793891771686c2286d4ac79af
2020-03-30 15:10:17 -07:00
TreeHugger Robot
6ee85a37f6 Merge "[HWUI] Add null check for CanvasContext" into rvc-dev am: c2e20c4b8a am: a1a64dc32d am: 5bf359df99 am: f5f276447d
Change-Id: Ib1f7a77046a348d3a5e5edeae309a502beb271fc
2020-03-28 04:37:22 +00:00
TreeHugger Robot
a1a64dc32d Merge "[HWUI] Add null check for CanvasContext" into rvc-dev am: c2e20c4b8a
Change-Id: Ib452de51c1b76cd6f5d5db4b04f70a4744d309ed
2020-03-28 04:04:55 +00:00
TreeHugger Robot
c2e20c4b8a Merge "[HWUI] Add null check for CanvasContext" into rvc-dev 2020-03-28 04:02:31 +00:00
Automerger Merge Worker
c9592a9e33 Merge "Merge changes If7ea17d5,If6364fd6 into rvc-dev am: 8275fb7d66 am: a6f2c4f62e" into rvc-d1-dev-plus-aosp am: c442bae47a am: 8b07124986
Change-Id: I7d68263e79de146173791d87859643f4ce2e761b
2020-03-27 18:45:58 +00:00