Commit graph

22 commits

Author SHA1 Message Date
Treehugger Robot
9cd21bb582 Merge "Add ExtendableType to allocate" am: 0a9430add2 am: efa98b101f am: 926b4d8b2d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2364519

Change-Id: I21a7c5c74a94f434d9f1237f742cb3f261b4f0be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-09 09:37:10 +00:00
John Reck
cf8d8bc769 Add ExtendableType to allocate
Allows for passing arbitrary additional options to IAllocator
Can be used to control things such as compression level without
exhausting usage bits

Currently there are no standard options defined so this only allows
for vendor-internal extensions currently.

Fixes: 257075040
Test: VtsHalGraphicsAllocatorAidl_TargetTest
Change-Id: I37b730f5ba141b08d458866c6d03a39b27124e02
2023-01-06 15:43:27 -05:00
Marc Kassis
9c428fe3ed graphics.common V3 -> V4
Bug: 251177105
Test: m
Change-Id: I816b8e14a0741402090cdc4732c2a904e830ff4e
Merged-In: I1cb84ec85f98789d0737207a1661b39a25538c96
Merged-In: I2e1561f4ccb59a2a833af9a7afd07840ab2ebfa4
2022-12-07 10:53:12 +00:00
John Reck
97f313746f IMapper 5 - the Stable C approach
Test: make VtsHalGraphicsMapperStableC_TargetTest VtsHalGraphicsAllocatorAidl_TargetTest

Change-Id: I910b27f388e3fb7261425dd4b2133885c05edd37
Merged-In: I910b27f388e3fb7261425dd4b2133885c05edd37
2022-12-01 17:37:59 +00:00
John Reck
48c546c7e9 IMapper 5 - the Stable C approach
Test: make VtsHalGraphicsMapperStableC_TargetTest VtsHalGraphicsAllocatorAidl_TargetTest

Change-Id: I910b27f388e3fb7261425dd4b2133885c05edd37
2022-11-18 11:20:00 -05:00
Steven Moreland
ed27779d14 graphics.common V3 -> V4
Bug: 251177105
Test: builds
Change-Id: I1cb84ec85f98789d0737207a1661b39a25538c96
2022-10-29 00:51:21 +00:00
Sally Qi
a1c66a2993 Add cc_defaults wrapper for android.hardware.graphics.allocator ndk
package.

- to avoid manually rev up if needed.

Bug: 243429120
Test: builds
Change-Id: I25bfcc203cda61af308c37c3766fa9efe6c6784c
Merged-In: I25bfcc203cda61af308c37c3766fa9efe6c6784c
2022-10-20 18:27:12 -04:00
Sally Qi
2600d345ed Add getOverlaySupport() AIDL interface.
- add new VTS for new AIDL interface/API. Disable this new vts case for
  now due to no implementation on cuttlefish.
- rev up android.hardware.graphics.composer3-V1-ndk to V2 version.

Bug: 242588489
Test: build, atest VtsHalGraphicsComposer3_TargetTest
Change-Id: I5a5c0d52d7b64d927d211abf77f534f37c4d65d0
2022-10-12 15:32:38 -07:00
Sally Qi
0435c6b4f3 Add cc_defaults wrapper for android.hardware.graphics.allocator ndk
package.

- to avoid manually rev up if needed.

Bug: 243429120
Test: builds
Change-Id: I25bfcc203cda61af308c37c3766fa9efe6c6784c
2022-09-01 13:28:00 -07:00
Sally Qi
784c253a05 Add cc_defaults as wrapper for graphics composer/common AIDL
interfaces.

- Add new Android.bp in graphics folder and wrap composer and common
  AIDL in to separate cc_defaults.
- remove composer3 dependency from allocator's VTS .bp file.

Bug: 243429120
Test: builds
Change-Id: Ia91e4ab87b7ac86248094317185b317d5604e654
2022-08-26 15:18:42 -07:00
Steven Moreland
e5c6548346 Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 14:23:43 -08:00
Steven Moreland
fcca4e23b7 Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 14:22:43 -08:00
Chia-I Wu
12b806bac0 graphics: add IMapper@2.1
Add necessary methods to protect the framework against crafted
buffer handles.

Bug: 62535446
Bug: 62084097
Bug: 32587089
Test: manual
Change-Id: I11486c0767a90788da9f84c2177202f26c0d9ce1
2017-10-03 15:41:18 -07:00
Chia-I Wu
79d13ff0f5 graphics: revise gralloc interfaces
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
2017-04-10 11:15:54 -07:00
Pawin Vongmasa
4a3cd13ddc Move IGraphicBufferProducer to graphics/bufferqueue.
Test: With CtsMediaTestCases.apk installed,
adb shell am instrument -e size small -w
'android.media.cts/android.support.test.runner.AndroidJUnitRunner'

Bug: 35442034
Change-Id: Ia1ef0eb069fcd97f7afcf42bf3bb16c8c6a752c4
2017-03-15 11:42:40 -07:00
Chia-I Wu
fed07e87ea graphics: add basic target-side tests for IComposer
Add graphics_composer_hidl_hal_test.

Test: manual execution
Change-Id: I38c2fcd5cfb27dcd0299df389cbf84fe4056de1b
2017-02-01 15:07:29 -08:00
Chia-I Wu
98f99cf4df graphics: add basic target-side tests for IMapper
Add graphics_mapper_hidl_hal_test.

Test: manual execution
Change-Id: Ieb8be74fad1b35f69d74f6f3a93dfa4289fee91d
2017-01-05 09:32:30 +08:00
Chia-I Wu
bc46dacfc7 graphics: add target-side tests for IAllocator (again)
With fix for libhidl split and use PixelFormat from common@1.0.

Test: make
Change-Id: Ie4001f4a0c6cb10a5c4f1889dc8cc1907fdee8ca
2016-11-22 06:38:15 +08:00
Chia-I Wu
24325c6356 Revert "graphics: add target-side tests for IAllocator"
This reverts commit 3e7889e0e8.

Change-Id: I724bcd2ea4fd1005cee132e13736cefd1820de73
2016-11-21 22:13:49 +00:00
Chia-I Wu
3e7889e0e8 graphics: add target-side tests for IAllocator
Add VTS annotation, generate .vts files, and add
graphics_allocator_hidl_hal_test.

Test: vts-tradefed
Change-Id: If5381315c4fca30c3798e4c266404d51b23ca508
2016-11-17 10:07:34 +08:00
Chia-I Wu
4ee34311b3 graphics: add a type-only common package
Copied from system/graphics.h with two changes

 - YCbCr -> YCBCR
 - HAL_TRANSFORM_RESERVED is removed

Test: make
Change-Id: I1d343ff176ac61f911fee949861ce4b12255cd47
2016-11-03 12:01:58 +08:00
Steven Moreland
69727778a7 Stop all these merge conflicts.
Test: mma -j64
Change-Id: I319198af32adf1fef180c5c2c22ba4b360fa7609
2016-10-26 12:04:37 +02:00