summaryrefslogtreecommitdiff
path: root/libs/bufferstreams
Commit message (Collapse)AuthorAgeFilesLines
* Merge changes Ia63685ac,I9c32ac17,I6ca17dda into mainJim Shargo2024-02-2210-19/+255
|\ | | | | | | | | | | | | * changes: bufferstreams: Present times are no longer Instants. bufferstreams: Make BufferOwner Send+Sync bufferstreams: Add AIDL interfaces/parcelables for stream types
| * bufferstreams: Present times are no longer Instants.James Shargo2024-02-162-18/+13
| | | | | | | | | | | | | | | | | | We need to be able to read these over the wire and send them as timestamps to C++ code. Replace the instants with a more compatible i64 timestamp nanos timestamp. Test: atest Change-Id: Ia63685ac406855b4a9257c661839640ab74a555c
| * bufferstreams: Make BufferOwner Send+SyncJim Shargo2024-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | This is important for IPCs to work, since buffers can come in over the wire, be processed by binder threads, and handed off to client-controlled worker threads. Bug: 296099728 Test: atest Change-Id: I9c32ac17e07456aa6a8e7211c67893a51fc9724c
| * bufferstreams: Add AIDL interfaces/parcelables for stream typesJim Shargo2024-02-167-0/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These interfaces incorporate jreck@'s ideas for caching and BufferAttachements. This means that we only need to send the heavy-weight HardwareBuffers once, and then we can just send a lightweight reference to the buffer. This interface is not intended for public use yet and is going to be actively developed for the next few months. Bug: 296099728 Bug: 296450069 Test: builds Change-Id: I6ca17dda1186ae74773bc344f3cda4b5574585aa
* | Add default_teamsJohn Reck2024-02-214-0/+16
|/ | | | | Test: n/a Change-Id: I6c2426303194df4b94f6181f4b5c71970bc5f7fd
* Set the container field of aconfig flagsOriol Prieto Gasco2024-02-072-0/+2
| | | | | | | | Please see go/aconfig-flag-containers for more context Test: m Bug: 312769710 Change-Id: Ibe1f32691a2fb10a267b580766abcde621a596ff
* Add logging funtionatily to the example app.Carlos Martinez Romero2023-12-087-80/+185
| | | | | | | | | Logs can now be sent over from CPP to Kotlin and displayed in the LogOutput Card. Bug: 296272152 Test: Built and run on device. Change-Id: I79641dd9fbd6d04db0615579591a2bef4b24c914
* Updated the BufferStreamsDemoApp UI to jetpack compose.Carlos Martinez Romero2023-10-2616-65/+376
| | | | | | | | | | | | The project is no longer using Java and now the MainActivity uses Kotlin, calling JNI from Kotlin is fairly simiar. Currently there are 3 empty demo screens, the first demo screen will call a JNI function but there is no support for logs. Bug: 296272152 Test: Built and ran on device. Change-Id: I92f0951899fb6379e1506abdc8e1d67002433787
* libbufferstreams: Add Buffer, BufferPool and BufferOwner.Carlos Martinez Romero2023-10-165-6/+279
| | | | | | | | | | | | | | | | | This change adds supoprt for a simple buffer pool. Buffer pools can be notified when a buffer is dropped, so the buffer can be provided by the pool again. We introduced the concept of a BufferOwner, which is generic and can be implemented by a client for their own custom buffer pools. Along the way we updated the Frame struct to use a Buffer instead of a AHardwareBuffer. Pair: jshargo Bug: 296450854, 296101127 Test: atest libbufferstreams-internal_test Change-Id: Ib7c1ba19f96d1deb3d329366aa9215ad89228f9e
* libbufferstreams: Add the BufferPoolPublisher.Carlos Martinez Romero2023-10-162-0/+115
| | | | | | | | | | The BufferPoolPublisher submits buffers from a pool over to a subscriber. Pair: jshargo Bug: 296450854, 296101127 Test: atest libbufferstreams-internal_test Change-Id: Ic473677c9c71b0505c3fcd2b4fb7d0fdf3d7d01b
* nativewindow: Misc. improvements for AHardwareBuffer Rust wrapperJim Shargo2023-10-102-4/+4
| | | | | | | | | | | | | | | | Changes include: - Rename AHardwareBuffer to HardwareBuffer - Expose AHardwareBuffer as a raw pointer type - Making HardwareBuffer Send - HardwareBuffer now derives Debug, PartialEq and Eq - Use NonNull instead of a *mut pointer - Adding an into_raw function to match from_raw - Adding a Clone impl that acquires a ref Bug: 296449936, 296100790 Test: atest libnativewindow_rs-internal_test Change-Id: Iaf916fabe49190f47abd1a9ed34afdb76fd20e40
* Merge changes Ibbf925d2,I12a2aa59 into mainTreehugger Robot2023-09-2610-47/+666
|\ | | | | | | | | | | * changes: bufferstreams: Add basic implementations of core BS traits libbufferstreams: Add a StreamConfig type (and associated trait methods)
| * bufferstreams: Add basic implementations of core BS traitsJames Shargo2023-09-229-42/+574
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For BufferSubscriptions, this change provides a generic implenmentation that tracks requests and cancellations. For BufferPublishers and BufferSubscribers, we provide test implementations that let a user manually control the flow of events between the two objects. The traits themselves have also been updated to be more generic--instead of forcing Arc/Weak pointers for shared objects, we now use generic owned types for a BufferPublisher's BufferSubscriber and a BufferSubscriber's BufferSubscription. To make it possible to hold into a handle to a BufferSubscriber while a BufferPublisher owns it, we provide a generic implementation of BufferSubscriber for any Arc<BS: BufferSubscriber> that delegates to the underlying subscriber. Bug: 296449936, 296100790 Test: atest libbufferstreams-internal_test Change-Id: Ibbf925d2dfb85f606baa3dc1f9722440af4f862c
| * libbufferstreams: Add a StreamConfig type (and associated trait methods)James Shargo2023-09-183-5/+92
| | | | | | | | | | | | | | | | | | This type will be used to create publishers and subscribers, and contains enough information to create AHardwareBuffers. Bug: 296100790, 296450062 Test: atest libbufferstreams-internal_test Change-Id: I12a2aa59e8931ab77c658371d16450f3618de8ce
* | Bufferstreams test app.Carlos Martinez Romero2023-09-2222-0/+399
|/ | | | | | | | Used to test out BufferQueues and BufferStreams. Test: Ran the app. Bug: 296272152 Change-Id: Ie1192658bf7db49b2ccc216433585fbd1cd1bff7
* bufferstreams: Set up flags and add ones for each milestoneJim Shargo2023-08-242-0/+84
| | | | | | Bug: 296101122 Test: m libbufferstreams_flags_rust libbufferstreams_flags_cc Change-Id: I529ab2a168163753df6439bc11fb0ceece0f9f0b
* Added the initial traits for bufferstreams.Carlos Martinez Romero2023-08-042-2/+137
| | | | | | | Bug: 290409936 Pair: jshargo Test: Pending tests Change-Id: I4d1344650bf7ce2a677e21e4c69e5884230b53a3
* Add the basic files needed for an empty library.Carlos Martinez Romero2023-07-138-0/+235
| | | | | | | Test: None Bug: 290409936 Pair: jshargo Change-Id: I7a31fcbd3f1facc519e6020d17a9de3f1b2e3d91
* libs: Add an empty-ish folder for libbufferstreamsJames Shargo2023-06-282-0/+24
Bug: 285321812 Ignore-AOSP-First: new OWNERS file, no need to synchronize Test: n/a Change-Id: I3b7665b18a203fdf1a457593fd8827528bb7b079