summaryrefslogtreecommitdiff
path: root/libs/nativedisplay/include
AgeCommit message (Collapse)Author
2025-01-09bufferqueues: Entirely remove support for passing GL fences into BQs Jim Shargo
There are very few if any real clients (i.e. non goldfish) that use these fences with bufferqueues. We can simplify the overall API by just removing it and doing explicit sync (which is what would happen anyway) where we would have passed them into the bufferqueue. Bug: 339705065 Flag: com.android.graphics.libgui.flags.bq_gl_fence_cleanup Test: old tests Change-Id: I1f3973c78aafe278708f203ef46a2b91b138eba7
2024-11-15bufferqueues: Simplify calls that don't use GL fences Jim Shargo
We wanna get rid of this API, and we can simplify all these calls to just avoid the argument. Bug: 339705065 Flag: EXEMPT refactor Test: old tests Change-Id: I4e94e66003cdcdc197254435e5a815dd53e67a20
2024-08-24nativedisplay: ConsumerBase-based classes now create their own BufferQueues Jim Shargo
Using ConsumerBase-based classes is now the recommended way to create BufferQueues. This is an important step for go/warren-buffers, because it consolidates usages of BufferQueues to supported APIs and reduces the libgui API surface that exposes IGBP/IGBC. BYPASS_IGBP_IGBC_API_REASON: this CL is part of the migration. Bug: 340933754 Flag: com.android.graphics.libgui.flags.wb_consumer_base_owns_bq Test: atest, presubmit, compiles Change-Id: I7592bec02a7fd7b1712dfd3bf47a61852136438f
2023-10-27libgui: use flag MACRO for BQ_SETFRAMERATE Ady Abraham
Bug: 281695725 Test: presubmit Change-Id: I644dadbfc72cd50d80c50d36da96078253bbc009
2023-09-26libnativedisplay: plumb setFrameRate to SurfaceTexure Ady Abraham
Bug: 281695725 Test: manual using a test app Change-Id: I2d18c843d9e0771cef4378f58f1197f974163fa0
2023-09-26libnativedisplay: Introduce SurfaceTextureListener Ady Abraham
This is a tiny refactoting needed for the next CL. Bug: 281695725 Test: manual using a test app Change-Id: I0635325717073b528dadb712a843aabb4efddd3b
2022-12-13Move Choreographer to libgui. Rachel Lee
For Attached Choreographer, we want to store, access, and set attributes on a Choreographer from the SurfaceControl it is attached to. SurfaceControl is in libgui, so move Choreographer from libnativedisplay into libgui as well. The Android.bp dep chain: libandroid includes< libhwui < libnativedisplay < libgui Bug: 255838011 Test: atest ChoreographerNativeTest (no regression) Test: make and flash Test: presubmit Change-Id: Ie9f8cac93a888127ffa48d7061a467649e0ca694
2022-11-28Move Choreographer impl to new file. Rachel Lee
Separates implementation from the API so it is neater. Bug: 255838011 Test: make, flash, atest ChoreographerNativeTest Change-Id: I8ac97ed4ebc1a4ed9d6315a473e178bf3d655252
2022-01-17Remove unused ADisplay_getDensity Brian Lindahl
Test: presubmit passed Bug: 207331905 Change-Id: Idf30898141172596b62f53d2b02786cff7a57b01
2021-11-24Plumb HDR metadata through ASurfaceTexture Alec Mouri
This is just used for hwui's usage - HDR metadata on SurfaceTexture is not publicly exposed. Bug: 200309590 Test: builds, boots Change-Id: I373e50ee2d2000cb46c6a73d01e58b965c168311
2021-08-06API change to include int for transformation and current crop rectangle. ramindani
Not used these values for now. BUG=152621633 Test: Verified manually and with atest TextureViewCameraTest atest TextureViewTest atest TextureViewSnapshotTest atest TextureViewStressTest atest PixelCopyTest atest BitmapTest atest HardwareBitmapTests Change-Id: If2fee82fadf947193e1c058600fecb2cde04ef5b
2021-08-06Revert "Adds out parameters for crop rectangle and transform" bsears
Revert "Add test to crop TextureView and verify if outer edge ha..." Revert submission 15339442-1texelcrop Reason for revert: Bisection identified these CLs as the likely cause of Droidfood blocking bugs b/195620803 and b/195637414 Bug: 195637414 Bug: 195620803 Reverted Changes: If1f448a94:Added crop rect to LayerDrawable to not crop Textu... Iefde6bdf7:Add test to crop TextureView and verify if outer e... Icf0ee20e8:Adds out parameters for crop rectangle and transfo... Change-Id: Ibf58514e70c15470b17a64a8182614dc42c1bc71
2021-07-20Adds out parameters for crop rectangle and transform ramindani
Test: Did the manual test and atest TextureViewCameraTest atest TextureViewSnapshotTest atest TextureViewStressTest atest TextureViewTest atest PixelCopyTest Writing crop test now BUG=152621633 Change-Id: Icf0ee20e81d8fb590b3ab0a087da8287815de706
2021-02-22Introduce DynamicDisplayInfo Marin Shalamanov
In this CL we introduce the getDynamicDisplayInfo call on ISurfaceComposer which replaces the existing - getDisplayModes - getActiveDisplayMode - getColorModes - getActiveColorMode - getHdrCapabilities This way all display properties can be queried atomically. The current DisplayInfo class is moved to the androd::ui namespace and it's renamed to StaticDisplayInfo. ui::DisplayMode is now LightFlattenable and the mode ID is int32_t instead of size_t in order to prevent serialization problems. Additionally we add the ID field to ui::DisplayMode. This way we no longer need the supported display IDs to be from 0 to N-1. Bug: 159590486 Bug: 180539476 Test: presubmit, manually test that device boots Change-Id: I52b170913ce47cb5df2e8417e6cc95d395df1fda
2021-02-02nativedisplay: drop unused dependency on libnativehelper Orion Hodson
Bug: 179115178 Test: m Change-Id: I3a9f277d27e69b0ff6e9c29c3e2a8a6a7179b9a9
2020-07-16Fix TextureView calling eglCreateImage with a destructed buffer Stan Iliev
Fix an issue with hardware buffer passed from the SurfaceTexture being destroyed before an SkImage is created. This CL is matched by a change in frameworks/base I4d121f087fc842ce317745e7b7e2656f80a52b7d. Test: Ran TextureView CTS tests and a few apps that use TextureView. Test: Fix verified by partner Mediatek Bug: 160930384 Bug: 152781833 Bug: 153045874 Bug: 156047948 Bug: 160514803 Bug: 155545635 Bug: 155171712 Change-Id: I2e025e683052168546f2e271a20a857b1e556b64
2020-05-07Receive refresh rate callbacks from DMS Alec Mouri
AChoreographer will use DMS as the source of truth for these callbacks instead of SurfaceFlinger. Bug: 154874011 Test: ChoreographerNativeTest Tes: Manually verify that HWUI is processing refresh rate callbacks Change-Id: I961a7d1ab335800d3e260ba7564ddca9c0595cfc
2020-02-05[AChoreographer] Add const qualifiers for getFd(). Alec Mouri
Per API feedback the AChoreographer argument should be const. Bug: 148954590 Test: builds Change-Id: Ie95481992534b3f5f5c664709bff80b1c21f7d50
2020-01-23[AChoreographer] Move refresh rate callback headers into android Alec Mouri
This is in parallel with exposing these apis into NDK from libandroid. Also performing some cleanup: * Add additional documentation. * Pass an extra data pointer when unregistering a callback, so that callbacks are keyed by callback function + data pointer. This way the same callback method can be passed with different data pointers. * Enforce in the implementation that the same callback + data pointer can't be registered twice. * Update cached vsync period once all callbacks have been fired for a refresh rate change, not just when the first one fired. Bug: 136262896 Test: ChorographerNativeTest Change-Id: I9d1224bf05dcaf820166996b58a10b6e73d6adcd
2020-01-16Move SurfaceTexture implementation to libnativedisplay Stan Iliev
Move SurfaceTexture C++ implementation from libgui to libnativedisplay. Move ASurfaceTexture JNI implementation from libandroid to libnativedisplay. Move surface_texture_platform.h implementation in the same file as ASurfaceTexture NDK implementation. Delete ASurfaceTexture_create, which is no longer used by TextureLayer. Move ASurfaceTexture definition from surface_texture_platform.h to private implementation. Test: pass CtsUiRenderingTestCases and CtsViewTestCases Bug: 147060713 Change-Id: I9619124b8ab682c75efb5db17685b074ad422722
2020-01-13[libnativedisplay] Cleanup map file usage Alec Mouri
* Update Android.bp to use the map.txt file as a version script * Move ADisplay stubs into c++ stubs, since they don't need to be formally stable as long as they're treated as stable in practice. Bug: 136262896 Test: builds Change-Id: I17a1fb758e318e959538ba4bda32b886a5423d82
2019-12-26[AChoreographer] Add private api that decouples from ALooper. Alec Mouri
For ease of use by HWUI, we'll get rid of the reliance of a thread-local ALooper: * Rather than using AChoreographer_getInstance to access a thread-local AChoreographer instance, the caller will be expected to create and destroy its own instnace. * For use by HWUI's own looper instance, _getFd() will expose the underlying file descriptor from which events can be listened. The corresponding choreographer combined callback can be called to flush pending display events. Bug: 136262896 Test: builds Change-Id: I94f102da22974cbad37f21a68d2f04ac0cec5c78
2019-12-26[AChoreographer] Add refresh rate callback. Alec Mouri
This will augment the NDK to respond to display events where the display refresh rate changes. Consumers of this api will include: * HWUI, for implementing a policy for determining whether to use render-ahead, * Swappy, to potentially replace jumping into Java from native code to respond to display evnets there. * Any other native app that would rely on the up-to-date display refresh rate. Currently however this is not yet exposed to NDK as CTS is not yet written. Once CTS is written then this will be formally exposed to NDK. For now we'll leave these as APEX apis to represent incremental progress. Bug: 136262896 Test: builds Change-Id: I66d393f93eb5d681547411e330ef1b8950a35c5d
2019-11-20[ADisplay] Expose preferred WCG format per-display Alec Mouri
This mirrors the api exposed by the SDK. Similarly to the other ADisplay apis, the intention is that these apis will be #apex stable, but the map file doesn't need to be updated until HWUI is shipping in an updatable module. Bug: 144505134 Test: builds Change-Id: I2a06e4c304edb28d4580ef0aef4431ec8df2d94e
2019-11-13[AChoreographer] Split source files out from libandroid. Alec Mouri
This change is prework for allowing HWUI to depend on AChoreographer so that the dependency on DisplayEventReceiver is decoupled. AChoreographer needs to be split out from libandroid, as libandroid transitively depends on libhwui causing a circular dependency otherwise. Bug: 136262896 Test: builds Change-Id: Id60f9801cd82314065d82462e2a4286a3cb91e98
2019-10-25Add a C-api for retrieving display info. Alec Mouri
As HWUI will need to depend on ABI-stable interfaces moving forward, we need such an interface against SurfaceComposer for retrieving display metadata. This CL won't contain a map file to stabilize the ABI yet, as I expect that there will be some flux due to refresh rate apis. Bug: 136263392 Test: builds Change-Id: I7227e2e72789d36a21534840eac88817135251c3