Commit Graph
6 Commits
Author SHA1 Message Date
Camillo LugaresiandCopybara-Service eb8ef1ace0 Use shared_from_this in GlTextureBuffer::GetReadView, GetWriteView
This ensures that the callbacks in GlTextureView won't call an expired object, even if user code holds a GlTextureView after releasing the buffer.

Note that GlTextureBuffer is not always held by a shared_ptr, but it always is when GpuBuffer calls GetRead/WriteView on it. An alternative solution would have been to have GpuBuffer pass its shared_ptr<GlTextureBuffer> to the view method, which could have been implemented with some compile-time logic to detect whether the method expects such an argument. However, that doesn't seem necessary.

PiperOrigin-RevId: 489611843
2022-11-18 19:42:34 -08:00
Camillo LugaresiandCopybara-Service 4bda012bba Factor out gl_texture_util
PiperOrigin-RevId: 488797985
2022-11-15 17:13:22 -08:00
MediaPipe TeamandCopybara-Service 43345160c5 Add ImageFrame and GlTexture view providers to Ahwb GpuBuffer storage
- ImageFrame views are backed by CPU locks of the AHWB.
- GlTextureViews are managed through a GlTextureBuffer connected to the AHWB allocation.

This improves the latency of heterogeneous access sequences, but makes `ImageFrame > ImageFrame` sequences slower due to CPU locking.

PiperOrigin-RevId: 481982546
2022-10-18 11:59:29 -07:00
MediaPipe Teamandjqtang 4a20e9909d Project import generated by Copybara.
GitOrigin-RevId: b66251317fbebfbb8e1f2ddc64ea5da84bceb7e5
2022-05-06 17:05:30 -07:00
MediaPipe Teamandjqtang cc6a2f7af6 Project import generated by Copybara.
GitOrigin-RevId: 73d686c40057684f8bfaca285368bf1813f9fc26
2022-03-21 12:12:39 -07:00
MediaPipe Teamandjqtang a2a63e3876 Project import generated by Copybara.
GitOrigin-RevId: 796203faee20d7aae2876aac8ca5a1827dee4fe3
2019-09-30 11:26:36 -07:00