diff options
author | Stan Iliev <stani@google.com> | 2020-01-13 11:29:18 -0500 |
---|---|---|
committer | Stan Iliev <stani@google.com> | 2020-01-17 20:09:19 +0000 |
commit | 5af5d3077f921994b90e9bad89d393421f3cc160 (patch) | |
tree | e583f7767a51589a55ce7701e4e7f0ace3992b96 /libs/hwui/DeferredLayerUpdater.h | |
parent | 25e6dd3ed13346a0fe7056d02ad9faf1328367e2 (diff) |
Refactor TextureLayer JNI to use only APEX APIs
Move ASurfaceTexture JNI implementation from libandroid to
libnativedisplay.
TextureLayer uses ASurfaceTexture_fromSurfaceTexture from
libnativedisplay instead of libandroid_runtime code.
libgui is no longer leaked through surface_texture_platform.h.
DeferredLayerUpdater uses ASurfaceTexture_release instead of
private ASurfaceTexture dtor.
Test: pass CtsUiRenderingTestCases and CtsViewTestCases
Bug: 147060713
Exempt-From-Owner-Approval: Changed only a header path in android_hardware_camera2_legacy_LegacyCameraDevice.cpp
Change-Id: I9720d9c383f8120f9db116fd2b74fc241af84396
Diffstat (limited to 'libs/hwui/DeferredLayerUpdater.h')
-rw-r--r-- | libs/hwui/DeferredLayerUpdater.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libs/hwui/DeferredLayerUpdater.h b/libs/hwui/DeferredLayerUpdater.h index 289f65c22ad3..c44c0d537fa7 100644 --- a/libs/hwui/DeferredLayerUpdater.h +++ b/libs/hwui/DeferredLayerUpdater.h @@ -21,8 +21,7 @@ #include <SkMatrix.h> #include <android/hardware_buffer.h> #include <cutils/compiler.h> -// TODO: Use public SurfaceTexture APIs once available and include public NDK header file instead. -#include <gui/surfacetexture/surface_texture_platform.h> +#include <android/surface_texture.h> #include <map> #include <memory> @@ -37,7 +36,7 @@ namespace uirenderer { class AutoBackendTextureRelease; class RenderState; -typedef std::unique_ptr<ASurfaceTexture> AutoTextureRelease; +typedef std::unique_ptr<ASurfaceTexture, decltype(&ASurfaceTexture_release)> AutoTextureRelease; // Container to hold the properties a layer should be set to at the start // of a render pass |