417 Commits

Author SHA1 Message Date
Torne (Richard Coles)
d2f37cc575 Allow the WebView native library to have dependencies.
The WebView native library has so far only depended on native libraries
that were already loaded by the zygote, and has only shipped a single
.so file in its APK. Splitting the code into multiple libraries worked,
but only the top-level library would have its RELRO section shared,
causing a memory regression.

To avoid this regression if we do decide to split up the native code in
future, load the native library using the new RESERVED_ADDRESS_RECURSIVE
flag in the linker, which means that any depended-upon libraries will
also be loaded into the reserved address region and will have their
RELRO sections saved and reused.

Fixes: 128623590
Test: tested manually with modified WebView
Change-Id: I19ee3ff971e8dcd1c683f94af304abf918860a10
2019-04-04 14:41:03 +00:00
Seigo Nonaka
b3a7bcea2a Update the system font implementation for new API change
Bug: 129559385
Test: TEMPORARY_DISABLE_PATH_RESTRICTIONS=true m ndk-docs
Test: atest CtsGraphicsTestCases:android.graphics.fonts
Change-Id: I73fd366762e4923886529a49a682cdc1cdceb1aa
2019-04-02 14:28:45 -07:00
Bo Liu
d336f5d95f Deprecate is_layer for vulkan functor
Webview no longer needs this.

Bug: 124123583
Test: comppiles and vulkan webview in layer keeps working
Change-Id: Ib54e33649eb027a03184c5d7588cfd9568c90a6c
2019-03-25 09:34:27 -04:00
Valerie Hau
5a9151e492 Adding AHardwareBuffer lockAndGetInfo to libandroid
Bug: 123423521
Test: build, boot,
android.hardware.nativehardware.cts.AHardwareBufferNativeTests

Change-Id: I81d7fa7352b7720103975ab0910d57953e0a7ec4
2019-03-21 12:39:04 -07:00
Bernie Innocenti
a7de534a93 Merge "Add junyulai@ as owner of the core networking dirs" am: e5e3ac639b am: b0498ba448
am: 6f6fc40839

Change-Id: I5902959b76797a58884480e3fd219ba53497ae8e
2019-03-09 06:04:09 -08:00
Bernie Innocenti
ea89cf2c6e Add junyulai@ as owner of the core networking dirs
Also removed emeritus accounts ek@ and silberst@ from various places.
A cleanup using 'include' would probably be in order...

Test: N/A
Change-Id: I575e60dd5e600e42d9571ce8e8d7661d30e99bfe
2019-03-08 13:04:05 +00:00
Santos Cordon
458d3df21f Add explicit 64-bit postFrameCallback APIs
Bug: 123660572
Test: atest -a android.view.cts.ChoreographerNativeTest
Change-Id: Idff869a435ddb9b858a95993c1e4c6a5c668322f
2019-03-06 16:24:55 +00:00
Ady Abraham
a5a21f70e1 DisplayEventDispatcher: add DISPLAY_EVENT_CONFIG_CHANGED
Add a new event for display configuration change. This event
will be sent by SF anytime it changes the display config.

Test: Generate DISPLAY_EVENT_CONFIG_CHANGED and observe the log
Bug: 122905403
Change-Id: Ifa473a34d7b313501e5e4e8a67186fb82754fdcd
2019-02-22 17:54:06 -08:00
Marius Renn
0e636a8b5f Merge "Adds new HardwareBuffer plane-locking functions to NDK" 2019-02-13 01:16:12 +00:00
TreeHugger Robot
5ea4f3ce4e Merge "ASurfaceControl: dataspace (1/2)" 2019-02-11 20:36:39 +00:00
Marissa Wall
7f24f79bc8 ASurfaceControl: dataspace (1/2)
Allow dataspace to be set on the SurfaceControl.

Test: atest CtsViewTestCases:android.view.cts.ASurfaceControlTest
Bug: 80477568
Change-Id: Idc12d0a4024fc21d570c5190af33559b818b4b08
2019-02-08 10:53:56 -08:00
Dominik Laskowski
9e7dce3833 Merge "Generalize physical display management" 2019-02-06 22:46:09 +00:00
Bo Liu
d25d1345a3 Do not call postDrawVk if did not call drawVk
Reland enable vulkan webview functor

Bug: 123877499
Bug: 115613038
Test: Gmail in bug no longer crashing.
Change-Id: I7df761a4691ceaa6c2a02b256d61554e57139409
2019-02-04 20:02:18 -08:00
TreeHugger Robot
30780a26f4 Merge "Revert "Enable vulkan webview draw functor"" 2019-02-05 01:15:34 +00:00
Bo Liu
a2b2535bd7 Revert "Enable vulkan webview draw functor"
This reverts commit dec730fda539fa941f7db1b9ed231a4585654dbe.

Reason for revert: b/123877499

Change-Id: I14fc562c81f5ef5dab0f5404402b64858e54e364
2019-02-04 23:05:44 +00:00
Dominik Laskowski
3316a0a08e Generalize physical display management
This CL enables the framework to manage an arbitrary number of physical
displays. It also surfaces physical display IDs, which are stable across
reboots and encode (model, port) information that will be propagated
further up in a follow-up CL.

Bug: 116025192
Test: Boot with more than two displays
Test: Hotplug works with any number of displays
Test: Verify stable display IDs with "dumpsys display"
Change-Id: Idb2eaff66b2e0873be6ad27d337ff18b730d1331
2019-02-04 10:06:15 -08:00
Valerie Hau
6bc48231fc Combining background color transactions
Bug: 122326454
Test: ASurfaceControlTest cts test
Change-Id: Ie6d6c5d4d8a27cbf936936200d1c81619d83ca87
2019-02-01 13:18:56 -08:00
TreeHugger Robot
e703b1985f Merge "Enable vulkan webview draw functor" 2019-01-31 03:41:29 +00:00
Greg Daniel
eaf310e1ce Update Vulkan skia creation to use apiVersion instead of instanceVersion
This updates to use Skia's new api which takes the vulkan apiVersion
instead of the instance version. This is technically more correct since
the application apiVersion is really the only client modifiable version
value in vulkan.

This change also updates the webview structs to use the apiVersion as
well.

Test: manual build and testing.
Change-Id: I6ce7c20949eb7242f7bbe69955b54c0785696891
2019-01-29 15:03:10 -05:00
Peiyong Lin
9934adcaa5 Merge "Eliminate the usage of ConfigStore." 2019-01-26 22:09:13 +00:00
Peiyong Lin
0d04f32385 Eliminate the usage of ConfigStore.
Ideally modules above SurfaceFlinger should query ConfigStore through
ISurfaceComposer APIs. Previously getWideColorSupport directly evaluate wide
color support for built-in display, we don't want that, we should align it with
SurfaceFlinger.

BUG: 123312783
Test: Build, flash and boot. Verify in logcat.
Change-Id: I6299fe1a5483075a98adbb903d3bb68255afb699
2019-01-24 17:57:50 -08:00
Bo Liu
b6da7f634f Add color space params to webview gl functor
Bug: 111436479
Test: Compiles
Change-Id: I6713afbb871a5c7027bac1e0f52ce2a841f38e25
2019-01-24 14:04:58 -08:00
Bo Liu
dec730fda5 Enable vulkan webview draw functor
Bug: 115613038
Test: Webview with vulkan enabled works
Change-Id: Ia450e93925ea04ff13d6e1731618a16862c66539
2019-01-24 04:22:35 +00:00
Valerie Hau
5bbfd51757 Add setColor, setColorAlpha, and setColorDataspace to ASurfaceControl
Bug:122326454
Test: atest CtsViewTestCases:android.view.cts.ASurfaceControlTests

Change-Id: If41f0a6b736315dbdb829cf3f8fefc654ede9bcf
2019-01-23 12:12:27 -08:00
TreeHugger Robot
9ce77e9b7f Merge "ASurfaceControl: add more support to NDK (1/2)" 2019-01-22 22:38:20 +00:00
TreeHugger Robot
d3ea060251 Merge changes from topic "sensors_ndk_filter"
* changes:
  Export ASensorEventQueue_requestAdditionalInfoEvents
  Add ASensorEventQueue_requestAdditionalInfoEvents
2019-01-22 20:47:43 +00:00
TreeHugger Robot
0bec8721ab Merge "Export ASensor_getHandle" 2019-01-22 20:44:07 +00:00
Brian Stack
ea2cb0c72f Export ASensorEventQueue_requestAdditionalInfoEvents
Bug: 77276247
Test: Builds
Change-Id: Ifa65a67aa136dcec884b16241c99a3349d1de2dc
2019-01-18 17:31:05 -08:00
Brian Stack
9da89b25ac Add ASensorEventQueue_requestAdditionalInfoEvents
Implements the ASensorEventQueue_requestAdditionalInfoEvents which
allows for a client to request additional information sensor events.

Bug: 77276247
Test: Verified additional information events are only delivered to NDK
      clients that have explicitly requested them through the
      ASensorEventQueue_requestAdditionalInfoEvents function

Change-Id: I304ba73908e5dd3eec61360d26e5321d442c6077
2019-01-18 17:31:05 -08:00
Marissa Wall
1be5a10c39 ASurfaceControl: add more support to NDK (1/2)
Adds several new functions and updates existing functions.
 - release fences
 - desired present time
 - alpha
 - hdr metadata

Test: atest CtsViewTestCases:android.view.cts.ASurfaceControlTest
Bug: 80477568
Change-Id: Iabda5936a51030bebabc4328dbd83108401603c2
2019-01-18 16:35:49 -08:00
Brian Stack
93c25986de Export ASensor_getHandle
Bug: 122366555
Test: Verified ASensor_getHandle is available to NDK clients in
      libandroid and the function returns the correct handle.

Change-Id: Ib08fbcc6862d3d3d4906a457d7708cb600dd161c
2019-01-17 17:01:47 +00:00
TreeHugger Robot
d69a4b853b Merge "Introduce ASensor_getHandle API to Sensors NDK" 2019-01-17 16:54:02 +00:00
TreeHugger Robot
34495b9fc8 Merge "VkFunctorDrawable implementation" 2019-01-16 01:21:08 +00:00
Bo Liu
7b8c1eb302 VkFunctorDrawable implementation
Bug: 115613038
Test: Turning on vulkan with appropriate webview apk does not crash and
sort of works.
Change-Id: If1504da7a35e4bd74a994ab2c2a351e6bc415a18
2019-01-15 15:25:04 -08:00
TreeHugger Robot
4fd4e36be2 Merge "ASurfaceControl: add SurfaceControl to NDK (1/2)" 2019-01-15 18:40:24 +00:00
TreeHugger Robot
4831523575 Merge "Put HWUI & Webview color space in a struct" 2019-01-15 08:13:49 +00:00
Nick Kralevich
911bffde21 Merge "sharedmem.cpp: replace dup() with fcntl(F_DUPFD_CLOEXEC)" am: 98546b23b9 am: 9c5c779597
am: 3ce18850a4

Change-Id: If3ac8e9fd81d17e73304652aca52c7df1316113f
2019-01-14 20:24:04 -08:00
Chris Blume
1a2bdc8c65 Put HWUI & Webview color space in a struct
The color space parameters are currently separate members. This was
making passing color space parameters to functions a bit messy.

This CL puts the color space parameters into their own struct which can
be cleanly passed to functions.

Test: Builds locally
Change-Id: I3709b88dbdedb9616d4905ee973c3099f95b3ca7
2019-01-14 14:48:46 -08:00
Nick Kralevich
396497085a sharedmem.cpp: replace dup() with fcntl(F_DUPFD_CLOEXEC)
Replace calls to dup() with fcntl(F_DUPFD_CLOEXEC). The only difference
between the two is that O_CLOEXEC is set on the newly duped file
descriptor. This helps address file descriptor leaks crossing an exec()
boundary.

Test: compiles and boots
Change-Id: I95218331382b7a3432d31a46c173009dc4df1a6b
2019-01-14 13:53:40 -08:00
Marissa Wall
f6a73faf81 ASurfaceControl: add SurfaceControl to NDK (1/2)
Add the NDK API for apps to use SurfaceControl for low level compositing
using SurfaceFlinger.

Test: atest CtsViewTestCases:android.view.cts.ASurfaceControlTest
Bug: 80477568, 111656650

Change-Id: If2c85a4427f422e41feeadbee0b64de7eb5c925e
2019-01-14 12:13:36 -08:00
Brian Stack
38c97d4ff6 Introduce ASensor_getHandle API to Sensors NDK
Adds the ASensor_getHandle API to the Sensors NDK which returns a
sensors internal sensor handle.

Bug: 122366555
Test: Builds, verified function returns correct handle
Change-Id: I1358528d2e7ee2918d5f5c2195d51adaa2cc3661
2019-01-11 17:30:13 -08:00
renn
e9345521e3 Adds new HardwareBuffer plane-locking functions to NDK
Test: Run cts-tradefed run commandAndExit cts -m CtsNativeHardwareTestCases
Change-Id: I253abd9f862dc0fcdc55c228164fc37edf35cb7b
2019-01-11 13:40:55 -08:00
Dongwon Kang
8939f1cf48 Merge "Add 'stubs' to libandroid" am: b0a1d4979e am: c70dc011f2
am: 7024b28cfe

Change-Id: Ie02eaa9c569db2555fd2ba62113d680f966fafb5
2019-01-10 18:27:21 -08:00
TreeHugger Robot
09b1843ca4 Merge "Rename Vulkan functor items to match style" 2019-01-11 01:09:00 +00:00
Chris Blume
237b092884 Rename Vulkan functor items to match style
Several of the first-iteration file/class/member variable names did not
match the style of their surrounding neighbors. This CL fixes that.

Test: Compiles
Change-Id: I9374e6cab79c57413e728d253067306d15011f2c
2019-01-10 13:06:46 -08:00
TreeHugger Robot
2f41a9c5ff Merge "Make sure interop path works with draw_fn" 2019-01-10 01:08:56 +00:00
Dongwon Kang
b61819e2a5 Add 'stubs' to libandroid
In order to exclude libandroid.so + its dependent libraries from the apex.

Test: build and check if libandroid.so is excluded in the media apex
Bug: 112766913
Change-Id: I5f1c5692a5395cf673d7868e0a429767d639720f
2019-01-09 16:02:59 -08:00
Bo Liu
30eef074f2 Make sure interop path works with draw_fn
plat_support to pass through the GL functor even if hwui is using vulkan
pipeline, since interop calls the GL functor.

Also remove sGLDrawThread and call functor on render thread, since
onDestroy and onContextDestroy are currently hard coded to run on render
thread as well, and functor expects all calls to be called on a single
thread.

Bug: 115613038
Test: draw_fn functor works with vulkan enabled
Change-Id: Ie3fa643695e95a6cc383f7ffe3eb3ad741792707
2019-01-09 20:41:06 +00:00
Luke Huang
cf0026e9fb Merge "Add control flags in asynchronous DNS query API" am: c04f9f731a am: f4a9829a18
am: f9f10f8044

Change-Id: Idfbe46d0a0b6db28856093942a55dc47c6bef1cf
2019-01-09 06:01:03 -08:00
Luke Huang
f3cc2b6aa5 Add control flags in asynchronous DNS query API
Test: built, flashed, booted
      cts test: NativeDnsAsyncTest

Change-Id: Ief04d99b2b289d95e54899572d28576d464037b8
2019-01-08 17:58:32 +08:00