Commit Graph

434 Commits

Author SHA1 Message Date
Derek Sollenberger
6c41ab13d0 Consolidate NDK and APEX implementations
the NDK APIs are implemented in terms of the APEX APIs to
reduce the number of different implementations serving the
same fundamental purpose.

Bug: 137655431
Test: CtsGraphicsTestCases
Change-Id: Idc7b85403a7e546843b9c1d822acc0a1e740059a
2019-11-21 12:49:20 -05:00
Alec Mouri
2ae4572e6a Merge "[AChoreographer] Consolidate AChoreographer source files" 2019-11-14 19:00:45 +00:00
TreeHugger Robot
224bccea58 Merge "Rename # vndk tag to # llndk" 2019-11-13 00:31:32 +00:00
Alec Mouri
440c5ac251 [AChoreographer] Consolidate AChoreographer source files
Now that AChroeographer is defined in libnativedisplay, libandroid
should not need its own copy. Instead what we do is:
* Statically link libnativedisplay into libandroid
* Delete choreographer.cpp

This structure is the same as that of ANativeWindow.

Bug: 136262896
Test: builds
Change-Id: I159d69398bb33ccd7b01aae798d14c04438355c1
2019-11-11 15:38:02 -08:00
Stan Iliev
aaa9e834d4 Decouple SurfaceTexture from HWUI
Remove all Skia and HWUI types from SurfaceTexture
implementation.
Move SurfaceTexture to libgui (ag/9578265).
Define private C++ API for SurfaceTexture, which is consumed
by DeferredLayerUpdater.
Move AutoBackendTextureRelease/Skia code from SurfaceTexture
to HWUI.

Test: pass CtsUiRenderingTestCases and CtsViewTestCases
Bug: 136263580
Change-Id: I3f971bb490f64a3ac0b2a66a89ba935bf7f08213
2019-11-08 15:37:17 +00:00
Jiyong Park
a9258ab2e1 Rename # vndk tag to # llndk
The APIs that are tagged with # vndk are actually for LLNDK libraries.
Although LLNDK is part of VNDK, calling those APIs 'vndk' has given
users a wrong perception that the APIs don't need to be kept stable
because that's the norm for most of the VNDK libraries that are not
LLNDK.

In order to eliminate the misunderstanding, rename the tag to 'llndk' so
that people introducing new such API will realize what they are signing
themselves up for.

Bug: 143765505
Test: m
Change-Id: I7ae77e232ec25cbe7afd98d1b68fc7a7fcf9bdfd
2019-11-08 11:23:19 +09:00
Seigo Nonaka
01709c7469 Make AFont_getLocale work
There are multiple problems here:
- Java Font.equals and hashCode doesn't look at locale list. Due to this
issue, the CTS tests have been passing unexpectedly.
- The null pointer check in the AFont_getLoacle was inversed. Should
return only when it is non-null.
- Looks like we cannot get the parent's attribute which always returns
null. Instead, read the "lang" attribute when we read the family tag.

Bug: 139201432
Test: atest NativeSystemFontTest
Test: atest TypefaceEqualsTest
Change-Id: I0514847bbf46a73358afab374ccfce2db09b2ec0
2019-10-29 19:53:35 +00:00
TreeHugger Robot
69a5323a46 Merge "Add userId to the package name API." 2019-10-22 19:57:55 +00:00
atrost
53bca9377d Add userId to the package name API.
The service would query package manager with the provided userId, and
will return true if the package is not visible.

Bug: 142942524
Bug: 143129258
Test: m, treehugger
Change-Id: I92ea650b49743c388bff9943a7ec620e3d61a5d6
2019-10-22 18:57:08 +01:00
Valerie Hau
d4dac416ae Merge "Adding transformHint to callbacks" 2019-10-22 16:13:59 +00:00
Valerie Hau
ec453e1423 Adding transformHint to callbacks
Bug: 141939598, 133512804
Test: build, boot, manual
Change-Id: I58411368e5187b3a23eb9e8ac9abbf1cb1a5d97e
2019-10-21 14:43:28 -07:00
atrost
874883536a Add a native aidl API.
Introduce a platform_compat_native service that just calls the
platform_compat service.
The new service is needed as it needs a slightly different (more
limited, no ApplicationInfo in cpp) aidl API, and a class can only
extend one stub.

Test: Call the service from dumpsys.cpp (http://aosp/1142055)
Bug: 138275545
Change-Id: Ic46cc34b4c1dd4ebc6bcc996fb3f8503607214ac
2019-10-17 11:53:47 +01:00
Valerie Hau
5e18c43fa7 Do not crash on invalid dataspace
Prior logic caused device to crash when setting the dataspace for a
layer to hdr on a non-hdr device.  Update to log the failure and perform
a no-op to match framework APIs.

Bug: 140029823
Test: build, boot, CtsViewTestCases:android.view.cts.ASurfaceControlTest
Change-Id: I9baf88a6d787e043b440ad4c2ebeb4c7a1fd90a2
2019-08-26 14:23:52 -07:00
Vishnu Nair
1ad69541a4 Handle NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY flag in ASurfaceTransaction
BufferStateLayer ignores NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY flag if its set as part of
the transform.

Fix this by calling Transaction::setTransformToDisplayInverse when calling
ASurfaceTransaction_setGeometry.

Bug: 133330435
Test: Test landscape orientation in test app
Test: go/wm-smoke
Change-Id: Id499448d822425e5b7be4efed7f448c4e4378b87
2019-05-23 09:09:09 +00:00
Marissa Wall
bb9b14f020 ASurfaceControl: fix surface damage
There are two problems with surface control.
1) By merging the rects, the Region turned into 0,0,0,0 instead of
an or of the Rects.
2) In the case where an app intends to have a region of 0,0,0,0,
we should treat it the same as a region of 0,0,-1,-1.

Bug: 131175047
Test: ASurfaceControl
Change-Id: Ib2e3b90ac215e069d3d3c2eca81ff1013b4287aa
2019-04-23 14:10:15 -07:00
TreeHugger Robot
c8723d6ca7 Merge "Pass runMax = 1 to stop unnecessary itemization" into qt-dev 2019-04-08 23:18:59 +00:00
Seigo Nonaka
ddc877300f Pass runMax = 1 to stop unnecessary itemization
Bug: 130044291
Test: N/A
Change-Id: I124b211f9a3db24d4c70c6d6bc0b1a9fdc93b9f7
2019-04-05 15:20:19 -07:00
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 dec730fda5.

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