This reverts commit 33c08a53ac. Some
gralloc implementations apparently have library initializers (executed
on dlopen) which create anonymous sockets, open device nodes, etc.
which Zygote and some other non-Zygote-child processes that use libui
don't have permissions to do. When the library initializer fails, it
crashes the process.
Reverting this until this initialization code can be made lazy (on
first use of gralloc).
Bug: 62732270
Test: boot fugu to launcher
In the a.h.graphics.mapper default implementation, load the gralloc
module in a static constructor that runs when the library is loaded.
This causes Zygote to load the gralloc module and its dependencies
when it loads a.h.graphics.mapper, so that it doesn't have to be
loaded during each activity launch.
Bug: 62353585
Test: boot to launcher, run calculator, confirm gralloc library is in
/proc/`pid zygote64`/maps
Change-Id: I56defd76b0ba0fba71dea48e2b0d338511563d1f
android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.
Test: links
Bug: 33276472
Merged-In: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
Change-Id: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.
Test: links
Bug: 33276472
Change-Id: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
A buffer handle recieved from a HAL is by definition raw and needs
to be imported. But because of passthrough HALs, such a raw handle
may have been imported already. Explicitly specify that an
implementation must accept such a raw handle.
Bug: 37540361
Test: boots on angler, ryu and marlin
Change-Id: I5ecf526e59b27cc4a8f7f5d5ec27477da0946ece
GraphicBufferMapper is valid during process termination. IMapper
must stay valid as well. It should not rely on global/static
objects that may have been destructed.
Bug: 37480313
Test: libgui_test
Change-Id: Icb8079153306f2465c26c0f1ce812895ad83f21b
Bug: 33241851
Test: links
Test: try build with BOARD_VNDK_VERSION current, no errors related to
this module
Test: (sanity) YouTube
Change-Id: Ia2c3922bf8bf1ab51396a8c8c5fa8d909c442994
Revise IAllocator and IMapper to reduce IPC and to support gralloc0
devices.
Specifically, IAllocator is trimmed down to have essentially only
allocate(BufferDescriptor descriptor, uint32_t count)
generates (Error error,
uint32_t stride,
vec<handle> buffers);
The ability to allocate buffers with shared backing store is
removed. ProducerUsage and ConsumerUsage are moved to the
graphics.common package and are merged and renamed to BufferUsage.
BufferUsage's bits follow gralloc0.
IMapper gains
typedef vec<uint32_t> BufferDescriptor;
createDescriptor(BufferDescriptorInfo descriptorInfo)
generates (Error error,
BufferDescriptor descriptor);
where BufferDescriptor is an implementation-defined blob. lockFlex
is replaced by lockYCbCr. All getters are removed.
Reference counting with retain/release is replaced by
importBuffer/freeBuffer.
Most if not all gralloc1 features are not used by the runtime yet.
There is also not too much test written for them. As such, they
tend to behave differently between implementations and cannot be
used reliably.
Bug: 36481301
Test: builds and boots on Pixel
Change-Id: I1d31105120517ea2c128c7a19297acf3bfd312bb
Add libVtsHalGraphicsMapperUtils which provides a wrapper to
IMapper. Port tests to be based on libVtsHalGraphicsMapperUtils.
Test: manual
Change-Id: I0639df178fd0a94153b48733930bb13f2d0aa930
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.
Test: builds
Bug: 33844934
Change-Id: Ic3859ccf21e7ee5177f47cb06e3e0c93dd572bf6
We need google shims on the vendor partition because they are providing
an implementation of a vendor defined interface. They were written by
google just as a courtesy/to make the transition easier. They're
basically a set for vendors to assemble their hal implementations
from.
Bug: 34135607
Test: marlin persist.hal.binderization on/off
Change-Id: I2e2af5af39264cf290259755bb9b2eb9827a21f5
graphics_mapper_hidl_hal_test is using types from
android.hardware.graphics.common@1.0, but common@1.0 was
not added as a dependency in Android.bp.
Test: make vts compiles
Change-Id: I0d1333e69e63f915df4e99c76173f32fb2c89093
Rewrite libgralloc1-adapter to be based on Gralloc1On0Adapter.
Previously, the adapter targeted maximum portability and maximum
performance. The rewritten adapter targets ease of use instead.
This also fixes a bug in the adapter's GRALLOC1_FUNCTION_RELEASE. The
function does not imply native_handle_close/native_handle_delete. As a
result, IMapper and IComposer are also fixed to close/delete handles.
Test: builds and boots
Change-Id: I5c071453dc950583087ae07967bca2c22866c538
Remove duplicated types from allocator@2.0 and composer@2.1. Those types
are now in common@1.0.
Bug: 32238126
Test: builds and boots
Change-Id: Ibdb907e47969f5a5a98a14a2e2b77a9c5880beff
There is no need to use a genrule to copy headers, just move them into
an appropriate directory in the source tree and export them directly.
Bug: 31948427
Test: mmma -j frameworks/native/libs/ui
Change-Id: I9c5f385e29c78d47479c77a546cfc737e4dd40f8