Make IComposer default implementation use the same process scheduler
as SurfaceFlinger does.
Bug: 35210697
Test: manual
Change-Id: Ie2ebe1d3fd26505984d9f6c33d63b5db36b0b64a
Java intermediates are now created in the common rather than the device-
specific generated sources subdirectory.
Bug: 33842609
Test: make
Change-Id: I16af4cd19bf0b24baa0ad9ebfdb86b4d959c8672
It is always on now and all buffers be cloned and registered.
Clients (SF) should make use of the buffer caching mechanism and
pass each unique buffer once, to avoid the overhead.
Test: manual
Change-Id: I74ccbf74e110c8b413a66cfc60044b71ba3f44e3
Decouples the ComposerClient code which deals with parsing the command buffer
messages sent by SurfaceFlinger from the Hwc code that handles the
commands.
Bug: 33297270
Test: Compiled and verified on device that hwcomposer-2-1 service can
start correctly. SurfaceFlinger can connect to the service and the
system boots up. Also verified SurfaceFlinger runs correctly without
hwcomposer-2-1.
Change-Id: I43357306caea57d262735f4756c379ba9d0138cd
To improve wide-color behavior it's useful to have more bits
per color component. This defines 10:10:10:2 and 10:10:10:X
for that use.
This can be used for any color space / dataspace that is
compatible with unsigned integer components, e.g. Display-P3,
BT2020, etc.
Test: TBD
Change-Id: I69647f6bb2d5b0666a0819b10ee42705361e267d
CommandWriter will be used as a base class in extensions of HWC. Renamed
for consistency.
Bug: 33297385
Test: Compiled
Change-Id: Iabe59f37157062961b916d55108cb9f4fb792619
* Updated the corresponding .vts file to match the latest .hal file.
Test: make android.hardware.graphics.allocator.vts.driver@2.0
make android.hardware.graphics.allocator@2.0-IAllocator-vts.profiler
make android.hardware.graphics.allocator@2.0-IAllocatorClient-vts.profiler
Change-Id: Ibf0fdf976a01015cca9cea71a6f25fc513d22d94
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
Threadpool can now be configured/joined if needed with
configureRpcThreadpool() / joinRpcThreadpool().
Bug: 31226656
Test: mma
Change-Id: I0d7d9924cc8c8851cc2b61ebdae906204909890e
Pointers are preferred for output parameters in graphics code. While at
it, initialize local variables that are for outputs.
Test: builds and boots
Change-Id: I959706ea92949bc2f993ee9beff0c8b0c3121347
Plane alpha was being sent as a float but read as unsigned, which, when
converted to a float was causing things that were supposed to be
translucent to be opaque.
Bug: 33739111
Bug: 33737738
Test: Scrim behind modal dialogs is translucent and there is no more
glitch when rotating apps
Change-Id: I6896bdbb9928bd1aa7265b3ef25a7a96d54ee227
Similar to IAllocator, introduce IComposerClient to manage resources.
Rework the interface such that most state changing calls are batched in a
"command buffer" and execute together. The goal is to reduce the number
of IPC calls needed to set up the composer.
Test: builds and boots
Change-Id: I324009243234c4d2482ca0ef2591377b11530fc9
Introduce IAllocatorClient to manage resources owned by a client (e.g., SF
or VTS). This makes sure there is no resource leak when SF or VTS
crashes.
This also fixes two unrelated bugs
- sizeof(Buffer) != sizeof(void*) on 32-bit impl.
- layerCount was not set to 1 in tests
Test: builds and boots
Change-Id: I67f5cdd64b97fb3ce1b931099c25f59cc8517f21
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
To allow genrules with more than one tool, rename the tool property to
tools and make it an array, replace $tool with $(location <label>),
and use $() for other variables for consistency.
Bug: 31948427
Test: compare build.ninja
Change-Id: I3d714f70a2af0dc60faeee10e09b6ed166601f1d
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
Copied from system/graphics.h with two changes
- YCbCr -> YCBCR
- HAL_TRANSFORM_RESERVED is removed
Test: make
Change-Id: I1d343ff176ac61f911fee949861ce4b12255cd47
Since HALs might run binder services, we need to start thread pool for
both binder and hwbinder.
Bug: 32021609
Test: builds and boots
Change-Id: I9779e86b1e611a180b1984af36c417dafc3329bc
The default implementatoin is built on top of conventional gralloc1.
Test: make android.hardware.graphics.mapper.hallib
Change-Id: I8647dc69dbb1637a141d36358d5769f450422ac1
IMapper is loaded in-process and is defined in C++ instead of HIDL. To
guarantee binary compability, the interface is a struct of function
pointers instead of a class of pure virtual member functions. The
functions pointed to by the function pointers must also have C-linkage and
have all of their parameters PODs.
Implementations are expected to be installed to
/oem/lib/hw/android.hardware.graphics.mapper.hallib.so
/vendor/lib/hw/android.hardware.graphics.mapper.hallib.so
/system/lib/hw/android.hardware.graphics.mapper.hallib.so
(lib64 instead of lib for 64-bit implementations)
The loader will look for the symbol "HALLIB_FETCH_Interface" and use it to
fetch the interface.
Test: make android.hardware.graphics.mapper@2.0
Change-Id: I3a2c7a6ce18a90adda6df2d89559c957a122fdf0
The default implementatoin is built on top of conventional gralloc1.
This also adds a static library, libgralloc1-adapter. It is intended to
ease the porting of gralloc0 to gralloc1.
Test: booted to launcher, tested with YouTube and some games.
Change-Id: Id640b1d5a1e1eea1aafabb6c134e6be6e71afff5
It differs from gralloc1.h in that
- buffer descriptors are created from a struct, BufferDescriptorInfo, to
reduce round trips
- testAllocate is a function of its own
- buffer allocation and export are two different steps
- reference counting and buffer mapping are moved to gralloc-mapper
- BAD_HANDLE is renamed to BAD_BUFFER
- GRALLOC1_CONSUMER_USAGE_FOREIGN_BUFFERS is removed
- CPU_{READ,WRITE}_OFTEN no longer implies CPU_{READ,WRITE}
Test: make android.hardware.graphics.allocator@2.0
Change-Id: Ibe9367d5b1701c0e1009da829f27fed0f7d98828