Commit Graph

396 Commits

Author SHA1 Message Date
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
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
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
Bo Liu
d6668e7c0c Plumb new functor in native/webview
Add plumbing to native/webview for the new functor.
Add a void* data parameter to avoid having to use a thread safe
map for in both the plumbing and in webview.

Test: Compiles and webview runs
Bug: 120997728
Change-Id: I0f9f3acb05688a5afcf95974bc0b3b117f33a8e3
2019-01-03 19:15:18 +00:00
Luke Huang
a62790c290 Merge "Following commit for asynchronous DNS query API" am: a89f04a742 am: b010078e40
am: 0c1ffb0f9b

Change-Id: Ia7922edb119c12f185684682fd4d097337125248
2018-12-19 01:42:53 -08:00
Luke Huang
d0c47e6e1b Following commit for asynchronous DNS query API
Test: built, flashed, booted
      atest CtsNativeNetDnsTestCases

Change-Id: Ia0f54ff684d2ad37ca82d94bad4e4dd582783d85
2018-12-17 16:47:20 +08:00
TreeHugger Robot
fbeaa52af9 Merge "Add C API for new webview draw functor" 2018-12-14 18:00:50 +00:00
Bo Liu
788d9577bc Add C API for new webview draw functor
Test: Builds successfully.
Change-Id: I684c2a976a92e1f1c6e116a8593e79a95c11bfb5
2018-12-13 11:23:11 -08:00
Lorenzo Colitti
f30016dd8b Merge "Add asynchronous DNS query API" am: d4ed663b80 am: 62f369e96d
am: 4bbddfe9dd

Change-Id: Id692d8f9ee870c71da33dec825958199db79cf49
2018-12-12 21:14:41 -08:00
Luke Huang
c17821cc11 Add asynchronous DNS query API
Adds support for asynchronous "raw" DNS API for clients.
API allows apps to use multinetworking capability correctly
and also allows other query types than A/AAAA.

Test: built, flashed, booted
      cts test: NativeDnsAsyncTest

Change-Id: I4701b76bd8f0094ef1bdd7c5371b54387914a91b
2018-12-12 04:17:41 +08:00
John Reck
9f029c5be3 Merge "Add NDK async begin/end & counter" 2018-12-06 21:43:18 +00:00
John Reck
77b31a5eb1 Add NDK async begin/end & counter
Bug: 111503982
Test: atest CtsAtraceHostTestCases
Change-Id: I038b76b505d3103f7b1e85a9469932d23cde2ab8
2018-12-05 18:16:39 -08:00
Chris Blume
4142339381 Add non-interop Vulkan functor
An interop Vulkan functor already exists. It will call the OpenGL
functor and use AHardwareBuffer to translate the OpenGL textures into
something which can be used in Vulkan.

This CL adds the frameworks for a non-interop Vulkan functor. This
functor is not yet complete (and as a result cannot yet be tested). This
is just setting the stage for future work.

Test: This is dead code and cannot yet be tested.
BUG=115613038

Change-Id: I2b87c86cb511abb961c31c17c2fbbc085b07ca4a
2018-12-05 16:26:59 -08:00
Chris Blume
83a9937f18 Add explicit values to ABI enums in libs/hwui
In a separate code review we agreed that at ABI boundaries it feels nice
to explicitly call out enum values rather than rely on the rules of
C/C++ which others may not be comfortable with.

This CL adds explicit values to enums inside draw_gl.h.

Test: I built and tested on a Pixel 2.
Change-Id: I64c03e2684c1ab096a9c0665e4ed3d8b7bb22ac7
2018-11-30 16:20:01 -08:00
Krzysztof Kosiński
57ae24c633 Merge "Export AHardwareBuffer_isSupported from libandroid." 2018-11-28 22:59:10 +00:00
TreeHugger Robot
9d03c64c97 Merge "Use "override" keyword instead of "virtual"." 2018-11-27 16:50:34 +00:00
Krzysztof Kosiński
e463bb6a83 Export AHardwareBuffer_isSupported from libandroid.
Bug: 115660272
Test: Builds and passes CTS on Pixel 2.
Change-Id: Ic67a7db98359b476c6cb146363040844efee475d
2018-11-21 21:41:35 -08:00
Chris Blume
0fd02aa33d Use "override" keyword instead of "virtual".
"override" provides a compile-time gaurantee that the function is indeed
overriding a virtual function. This prevents the potential mistake of
creating a new virtual function rather than overriding the original.

I happened to notice we could use "override" here instead of "virtual".
Might as well tidy up a bit.

Test: Built locally
BUG=115613038

Change-Id: I7f43f4a466d8ceaa1b863d6a2af054e69618d0c8
2018-11-19 14:25:31 -08:00
Dan Willemsen
d6764f8503 Merge "Convert libwebviewchromium_plat_support to Android.bp" am: 1feeeba433 am: e9db0313a3
am: f1c1db0153

Change-Id: I2aaa83120ea4c50bff44dbcbe976795602fdc89f
2018-11-19 11:22:57 -08:00
Dan Willemsen
f25ac31a60 Convert libwebviewchromium_plat_support to Android.bp
See build/soong/README.md for more information.

Test: m libwebviewchromium_plat_support
Change-Id: Ia999010453d428ddc12d2316436520d866498d78
2018-11-18 19:16:55 -08:00
Dimitry Ivanov
d3d596191f Merge "Apply version-script to libjnigraphics library" am: fe5f477ee7 am: 2520d62b6a
am: ac0e8e8fde

Change-Id: I49ac4f707b78a3558b09606053c949cb19d3c0ea
2018-11-16 00:29:29 -08:00
dimitry
761fe1bc0d Apply version-script to libjnigraphics library
Hide unintentionally exported symbols, validate that symbols mentioned
in the map file actually exported by the library.

Bug: http://b/69603741
Test: make
Change-Id: I80ec35b715b28dea45ebfbd216130c2c946c6668
2018-11-15 16:37:14 +01:00
Dimitry Ivanov
36154fdb82 Merge "Apply version-script to libandroid library." am: dbacdb242b am: 5291def66d
am: f3fa150b77

Change-Id: I3f0673ce51177295fbd8985eea26888501548bcc
2018-11-13 03:32:18 -08:00
dimitry
499745f900 Apply version-script to libandroid library.
Hides unintentionally exported symbols from the library.

Test: make checkbuild
Bug: http://b/69603741
Change-Id: Id679077267cc5ea6168c0b4701f827458087cb70
2018-11-08 15:07:32 +01:00