diff options
| author | 2021-05-27 16:38:57 +0000 | |
|---|---|---|
| committer | 2021-05-27 16:38:57 +0000 | |
| commit | 433ba6df077c26ad1aa8455f1f87e7cf1ecda706 (patch) | |
| tree | c6ec82189c27b7db1cb9cdd6b05cd72375c19799 /libs/hwui/DeferredLayerUpdater.h | |
| parent | 6addf5854a72a3a1c581fa2f23c3a7cf70ac3231 (diff) | |
| parent | 27e1fa257b9c538c53bcfbf30f6fc1833342b055 (diff) | |
Merge "In Vk DeferredLayerUpdater make sure we releause buffers to foreign queue." into sc-dev
Diffstat (limited to 'libs/hwui/DeferredLayerUpdater.h')
| -rw-r--r-- | libs/hwui/DeferredLayerUpdater.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/libs/hwui/DeferredLayerUpdater.h b/libs/hwui/DeferredLayerUpdater.h index 6731e9c428d6..8f79c4ec97b8 100644 --- a/libs/hwui/DeferredLayerUpdater.h +++ b/libs/hwui/DeferredLayerUpdater.h @@ -20,9 +20,12 @@ #include <SkImage.h> #include <SkMatrix.h> #include <android/hardware_buffer.h> -#include <cutils/compiler.h> #include <android/surface_texture.h> +#include <cutils/compiler.h> +#include <utils/Errors.h> +#include <EGL/egl.h> +#include <EGL/eglext.h> #include <map> #include <memory> @@ -103,13 +106,16 @@ private: */ class ImageSlot { public: - ~ImageSlot() { clear(); } + ~ImageSlot() {} sk_sp<SkImage> createIfNeeded(AHardwareBuffer* buffer, android_dataspace dataspace, bool forceCreate, GrDirectContext* context); + void releaseQueueOwnership(GrDirectContext* context); + + void clear(GrDirectContext* context); + private: - void clear(); // the dataspace associated with the current image android_dataspace mDataspace = HAL_DATASPACE_UNKNOWN; @@ -123,6 +129,10 @@ private: AutoBackendTextureRelease* mTextureRelease = nullptr; }; + static status_t createReleaseFence(bool useFenceSync, EGLSyncKHR* eglFence, EGLDisplay* display, + int* releaseFence, void* handle); + static status_t fenceWait(int fence, void* handle); + /** * DeferredLayerUpdater stores the SkImages that have been allocated by the BufferQueue * for each buffer slot. @@ -142,6 +152,7 @@ private: SkMatrix* mTransform; bool mGLContextAttached; bool mUpdateTexImage; + int mCurrentSlot = -1; Layer* mLayer; }; |