Commit Graph

10849 Commits

Author SHA1 Message Date
Chris Li
5eb5542245 Merge "Update WM Jetpack impl to use WindowMetrics" into rvc-dev am: cd13452cfb am: 6b607f03f2
Change-Id: Ide0ab5dac3747fe032d4b54abb0513a48e7e6b47
2020-05-15 16:08:05 +00:00
Chris Li
cd13452cfb Merge "Update WM Jetpack impl to use WindowMetrics" into rvc-dev 2020-05-15 04:49:40 +00:00
John Reck
906a94baec Merge "Avoid excessive KGSL maps" into rvc-dev am: acf8443e9a
Change-Id: Ia8f05049fce6d3f9c8e381e651d3d6c8cc69b59b
2020-05-10 05:12:27 +00:00
Chris Li
50df43e354 Update WM Jetpack impl to use WindowMetrics
Before, SettingsExtensionImpl#getWindowLayoutInfo returned empty window
info when Activity was not attached. Now, it returns the correct info
after Activity create.

Test: atest CtsWindowManagerJetpackTestCases:ExtensionTest
Fixes: 152534741
Fixes: 155121604
Fixes: 155692339
Change-Id: Ieded3b70ff14aba03581bf7501cc5e923b5eed33
2020-05-08 18:00:31 -07:00
John Reck
acf8443e9a Merge "Avoid excessive KGSL maps" into rvc-dev 2020-05-08 18:44:55 +00:00
John Reck
8ddbc59d55 Avoid excessive KGSL maps
Hook MIN_UNDEQUEUED_BUFFERS if possible to avoid thrashing kgsl
maps when render_ahead is being used

Bug: 143555869
Test: verified kgsl maps only happened once per buffer
Change-Id: I985fae0a9a7635be3a1cf6177186e5541a1169df
2020-05-07 16:47:10 -07:00
Haibo Huang
a2588f766f Fix the use of pdfium
FPDF_LoadPage returns FPDF_PAGE and that's also what expected by other
APIs. There's no need for conversion.

This works now because FPDF_PAGE is defined as void*. But will fails
with new pdfium.

Bug: 155031873
Change-Id: I74381ec8ec36797a5901ea3de845c2b5d798ba0c
(cherry picked from commit 24fca180a1)
2020-05-07 22:01:01 +00:00
Dheeraj Shetty
4367a7ec42 Merge "Revert^2 "hwui: remove FatVector"" into rvc-dev am: 21b6e912c2
Change-Id: I1eafb07255301a23cbd5aca5b70ff1d9b797e240
2020-05-01 23:32:39 +00:00
Dheeraj Shetty
21b6e912c2 Merge "Revert^2 "hwui: remove FatVector"" into rvc-dev 2020-05-01 23:27:43 +00:00
Chavi Weingarten
ac380004ac Merge "Send drawFinish callback even if did not draw" into rvc-dev am: 882ba30b8a
Change-Id: I7f116f022e8d0370d9d9635396f5e2b7fa17a7d6
2020-05-01 18:51:07 +00:00
Chavi Weingarten
882ba30b8a Merge "Send drawFinish callback even if did not draw" into rvc-dev 2020-05-01 18:27:59 +00:00
Leon Scroggins
7b410a9c0c Merge "Fix setShadowLayer + drawTextOnPath" into rvc-dev am: 7e17bc6496
Change-Id: Ib8bccc92bd3d7636ed38a1a98068d35ff21b4682
2020-05-01 18:08:33 +00:00
Jagadeesh Pakaravoor
b624af3dca Revert^2 "hwui: remove FatVector"
Revert submission 10449863-revert-fatvector

Reason for revert: b/149254345

Original change (of introducing FatVector) was reverted as a stop-gap solution to fix the aforementioned bug.

The bug was caused by an ABI lock between Surface's definition (that changed with Region) and lib-imsvt prebuilt.

Enabling this change now as we have re-compiled the prebuilt with the change enabled. Doing that via a revert of the revert.

Reverted Changes:
I8ac66acb8:Revert "hwui: remove FatVector"
Ib60dbf3ef:Revert "libui: rewrite Region with FatVector"

Original changes:
I09dc2fddd:hwui: remove FatVector
I265c6c831:libui: rewrite Region with FatVector

bug: 149254345

Change-Id: I9fb5e8908434abb9a763992e922445a2dc37e865
2020-05-01 15:57:15 +00:00
Leon Scroggins III
950f2aa825 Fix setShadowLayer + drawTextOnPath
Bug: 140255441
Test: I49c468b0f4cc142e5d6b03f0aee917b3d85153f3

Fix two issues that prevented this combination from working:
- make() the SkTextBlob once and reuse it for each iteration of the
  loop. This is necessary because make() resets the SkTextBlobBuilder,
  so a second call does nothing.
- use the altered SkPaint, passed as a parameter to the lambda, rather
  than the Paint passed to apply_looper.
Incidentally, reference mCanvas directly like the other methods, rather
than calling asSkCanvas(), which returns mCanvas.

Change-Id: I48ea1232b12df4f5f8afffc20c7dc8e5dc2bb511
2020-05-01 15:38:26 +00:00
chaviw
5fc80e7b32 Send drawFinish callback even if did not draw
There are cases where ViewRootImpl requests to draw, but there was
nothing new to draw. In that case, the callback will never be invoked
and ViewRootImpl will wait forever.

This change will invoke the callback even if there is nothing to draw.
It will use the last frameNumber since nothing new has drawn

Test: Request draw with nothing new. Callback is invoked
Fixes: 155429223
Change-Id: I7c9ed7fd63a451b17133a11ffbcf8fb64be558e5
2020-04-30 14:38:52 -07:00
Haibo Huang
24fca180a1 Fix the use of pdfium
FPDF_LoadPage returns FPDF_PAGE and that's also what expected by other
APIs. There's no need for conversion.

This works now because FPDF_PAGE is defined as void*. But will fails
with new pdfium.

Bug: 155031873
Change-Id: I74381ec8ec36797a5901ea3de845c2b5d798ba0c
2020-04-29 00:13:20 +00:00
Orion Hodson
18f7afccb6 Merge "Add explicit dependencies on jni_headers" am: c0fe0ae29f am: 6963d8e1c8
Change-Id: I2fdf3826653466d65e3d63fa896d1ec23c5716cd
2020-04-16 10:58:50 +00:00
Orion Hodson
6963d8e1c8 Merge "Add explicit dependencies on jni_headers" am: c0fe0ae29f
Change-Id: I8c84a9de389c0f82c307d835344038373d75f61a
2020-04-16 10:45:48 +00:00
Orion Hodson
63f06b738d Add explicit dependencies on jni_headers
Preparation for removing implicit include paths for jni.h from soong.

Also remove unnecessary jni.h includes from PathParser.{h,cpp}.

Bug: 152482542
Test: lunch aosp_x86_64 && m checkbuild
Change-Id: Ib18afa3d2c93ed3ce69204286d5177991100fd7e
Exempt-From-Owner-Approval: build refactoring
2020-04-16 08:26:14 +00:00
TreeHugger Robot
a3263bb756 Merge "Restore preserving mutability over parceling" into rvc-dev am: ac774e3304
Change-Id: I164641b941a37b3b576acccb0cf9d8c77340683f
2020-04-13 21:21:33 +00:00
TreeHugger Robot
ac774e3304 Merge "Restore preserving mutability over parceling" into rvc-dev 2020-04-13 21:12:54 +00:00
John Reck
9054ca2b34 Restore preserving mutability over parceling
Bug: 150836900
Test: CTS test BitmapTest#testWriteToParcelPreserveMutability
Change-Id: I2caba900a3259e2fb7b4e83d7241cebd7441fa06
Merged-In: I133047acfccae7af81199098caaf20ea8d641a89
2020-04-13 16:14:21 +00:00
Ryan Mitchell
5a57f52b6b Merge "Fail install when resources.arsc is compressed" into rvc-dev am: b8a61d13c2
Change-Id: Ib01a8e7b83525cf420dae44758fcc214669d887d
2020-04-13 15:14:05 +00:00
Ryan Mitchell
b8a61d13c2 Merge "Fail install when resources.arsc is compressed" into rvc-dev 2020-04-13 14:57:19 +00:00
Ryan Mitchell
cca1593b23 Merge changes from topic "invalidate_idmap" into rvc-dev am: 6cb79cdfb7
Change-Id: Iec3d0e3bab28964442c5aada00c2586e284feb92
2020-04-10 15:53:05 +00: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
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
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
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
289e25ee9b Merge "Change the parameter type of offset in read" am: 74a5df06af am: eead9e3eda
Change-Id: Ie2996a6fc8f7d08f3f77589e439557b42f4ed56a
2020-04-04 20:40:28 +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
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
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
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
Ryan Mitchell
3769911736 Merge changes If7ea17d5,If6364fd6 into rvc-dev am: 8275fb7d66
Change-Id: Iaa34df4fc6cce09177547a11497d28fa1ce9cdb5
2020-03-27 17:49:56 +00:00
Ryan Mitchell
8275fb7d66 Merge changes If7ea17d5,If6364fd6 into rvc-dev
* changes:
  Assigned package ids to overlays last
  Revert "Assign shared libraries stable package ids"
2020-03-27 17:38:32 +00:00
Tobias Thierer
0b4d263ca7 Merge "OWNERS: tobiast -> ngeoffray." am: 9c0d26b4cb am: d9b0a60742
Change-Id: I5b781cfc5b6383c61087b796e0e344be084d3dc9
2020-03-27 11:51:34 +00:00
Tobias Thierer
5bd921f8c3 Merge "OWNERS: tobiast -> ngeoffray." am: 9c0d26b4cb am: d9b0a60742
Change-Id: I34cec5528243e6655287ba020eef5abf7e2ca114
2020-03-27 11:51:27 +00:00
Alec Mouri
026106f6d6 [HWUI] Add null check for CanvasContext
If ReliableSurface is forced to acquire a fallback buffer then the
Surface may be abandoned. When getting frame timestamps we need to check
that the Surface still exists.

Bug: 152262035
Test: builds, boots
Test: dumpsys gfxinfo
Change-Id: Ifdb198ebf74cc9dc681c4ab51c4901176a7f5fc9
2020-03-26 18:09:53 -07:00