diff options
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; }; |