summaryrefslogtreecommitdiff
path: root/libs/hwui/DeferredLayerUpdater.h
diff options
context:
space:
mode:
authorStan Iliev <stani@google.com>2020-01-13 11:29:18 -0500
committerStan Iliev <stani@google.com>2020-01-17 20:09:19 +0000
commit5af5d3077f921994b90e9bad89d393421f3cc160 (patch)
treee583f7767a51589a55ce7701e4e7f0ace3992b96 /libs/hwui/DeferredLayerUpdater.h
parent25e6dd3ed13346a0fe7056d02ad9faf1328367e2 (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.h5
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