Commit Graph

380 Commits

Author SHA1 Message Date
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
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
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
Seigo Nonaka
75b841bd31 Implement matchFamilyStyleCharacter API
Bug: 114479228
Test: atest CtsGraphicsTestCases:android.graphics.fonts
Change-Id: Ieaa4251e0ba7c0479f048147141a81766016e9b6
2018-10-30 12:27:25 -07:00
Seigo Nonaka
367589889c Read OEM customization XML
We now moved OEM font customization outside of system image and all
system font modifications are in /product directory.

In this CL, only customizationType="new-named-family" is supported.

My previous CL If58711fc038898175fcad0ae095865312bd738e2 breaks test
cases in CtsGraphicsTestCases but TreeHugger didn't catch my mistake
becasue the test cases are not annotated as Presubmit.

Bug: 111544833
Test: atest CtsGraphicsTestCases:android.graphics.fonts
Change-Id: I7a7a2d91d8f37c51944d598dde7562733eae5626
2018-10-01 23:08:23 -07:00
TreeHugger Robot
946fbaa771 Merge "Label the libwebview address space reservation." 2018-09-17 08:18:44 +00:00
Seigo Nonaka
ce77caf677 Merge "Add native font enumeration API implementation" 2018-09-14 17:11:48 +00:00
Richard Uhler
fdd7a7e5b5 Label the libwebview address space reservation.
So it shows up in showmaps output as "[anon:libwebview reservation]"
instead of grouped in with the rest of "[anon]", to facilitate memory
debugging.

Test: Manually confirm libwebview reservation shows up in system server showmap.
Change-Id: I4897aff4406265a7be9fc37aecbe5967bcf29426
2018-09-14 10:07:20 +01:00
Seigo Nonaka
50692caa28 Add native font enumeration API implementation
ASystemFont API provides an ability of enumerating the system available
font files with some additional information.

ASystemFont reads /system/etc/fonts.xml and give the information to
developers.

Lots of developers reads fonts.xml by themselves but that is not a part
of public API and the structure is subject to change. This API is a
replacement of the reading fonts.xml by developers.

Bug: 111861508
Test: atest NativeSystemFontTest

Change-Id: I992902228650303eb10f486f1ec7838f218c15e7
2018-09-13 15:53:07 -07:00
TreeHugger Robot
94da778113 Merge "Simplify WebView RELRO creation and handle more cases." 2018-09-12 21:36:36 +00:00
Stan Iliev
564ca3e2c9 Reland "TextureView Vulkan support and optimized OpenGL draw"
Fix an issue with incorrect texture matrix, when there is 90/270 rotation.
This happened, because after refactoring SkImage has buffer width/height,
instead of layer width/height.
This reverts commit a683eb3945.

Bug: 113673613
Test: Ran TextureView CTS and lensblur in camera app
Change-Id: If3bcf9cd5195de09fd67a753708568a8e3ca3a9a
2018-09-05 01:58:34 +00:00
Stan Iliev
a683eb3945 Revert "Revert "Revert "TextureView Vulkan support and optimized OpenGL draw"""
This reverts commit 85f9096b52.

Reason for revert: lensblur broken.

Change-Id: I83ac163159fc537bc15936a0f8597a7512ca9d6e
2018-09-04 15:42:18 +00:00
Stan Iliev
85f9096b52 Revert "Revert "TextureView Vulkan support and optimized OpenGL draw""
This reverts commit 867c43de05.

Reason for revert: Fixed issue with unsupported hardware buffer formats by landing https://skia-review.googlesource.com/c/skia/+/150470 "Support more hardware buffer formats"

Bug: 113673613
Change-Id: I1f7c528f138e290160e75833c8d989d9535002ee
2018-08-31 22:13:15 +00:00
Stan Iliev
e6cfb09cc4 Merge "Revert "TextureView Vulkan support and optimized OpenGL draw"" 2018-08-30 18:56:41 +00:00
John Reck
867c43de05 Revert "TextureView Vulkan support and optimized OpenGL draw"
This reverts commit c8e22a6532.

Reason for revert: broke camera, b/113555199

Bug: 113555199
Change-Id: Iae9b462694d5de0cd99427afead63b567fb4d71d
2018-08-30 18:42:08 +00:00
TreeHugger Robot
54b9892f3c Merge "TextureView Vulkan support and optimized OpenGL draw" 2018-08-29 15:51:15 +00:00
Stan Iliev
c8e22a6532 TextureView Vulkan support and optimized OpenGL draw
Render TextureView as hardware bitmaps, instead of GL textures.
Cache SkImage for each observed GraphicBuffer, which is faster
even for GL.
Implement C++ SurfaceTexture, which allows Java SurfaceTexture
to be used with Vulkan HWUI render thread and application GL.
threads. Delete GLLayer and VkLayer classes and texture code
from old HWUI pipeline.

Test: Ran skiagl and skiavk pipeline with a TextureView app.
Test: TextureView CTS tests pass for GL pipeline.
Test: Ran Android NDK Native codec sample app.
Change-Id: Idc94f864ce2d34fd6ceff4be4fc7d3327e99879c
2018-08-29 10:22:03 -04:00
Sudheer Shanka
8e7cf05d27 Merge "Remove DefaultContainerService usage in StorageManagerService." 2018-08-28 18:01:24 +00:00
Sudheer Shanka
25469aacb8 Remove DefaultContainerService usage in StorageManagerService.
StorageManagerService uses DefaultContainerService to obtain ObbInfo
for files passed through mountObb() transaction. This change moves this
logic to client side and so ObbInfo will be passed as part of mountObb()
transaction.

Bug: 111838160
Test: atest src/android/os/storage/cts/StorageManagerTest.java
Test: atest core/tests/coretests/src/android/os/storage/StorageManagerIntegrationTest.java
Test: atest services/tests/servicestests/src/com/android/server/MountServiceTests.java
Change-Id: I29aee3aa54a45057df96aae289888161a3e3af71
2018-08-27 15:50:59 -07:00