From 70463a6583bf1bd4a8082623e54851872e9f8582 Mon Sep 17 00:00:00 2001 From: Alec Mouri Date: Mon, 30 Mar 2020 15:10:17 -0700 Subject: Use ANDROID_get_native_client_buffer in HWUI ReliableSurface still needs AHardwareBuffer_to_ANativeWindowBuffer to safely convert to an ANativeWindowBuffer to interop with the interception methods, but when converting to EGLClientBuffer the EGL extension should be used instead. Bug: 152802621 Test: builds, boots Change-Id: I49cfeee4d7e5d4e793891771686c2286d4ac79af --- libs/hwui/HardwareBitmapUploader.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libs/hwui/HardwareBitmapUploader.cpp') diff --git a/libs/hwui/HardwareBitmapUploader.cpp b/libs/hwui/HardwareBitmapUploader.cpp index be8f852ecf1b..c2d2ff874816 100644 --- a/libs/hwui/HardwareBitmapUploader.cpp +++ b/libs/hwui/HardwareBitmapUploader.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -178,7 +177,7 @@ private: uirenderer::renderthread::EglManager::eglErrorString()); // We use an EGLImage to access the content of the buffer // The EGL image is later bound to a 2D texture - EGLClientBuffer clientBuffer = (EGLClientBuffer)AHardwareBuffer_to_ANativeWindowBuffer(ahb); + const EGLClientBuffer clientBuffer = eglGetNativeClientBufferANDROID(ahb); AutoEglImage autoImage(display, clientBuffer); if (autoImage.image == EGL_NO_IMAGE_KHR) { ALOGW("Could not create EGL image, err =%s", -- cgit v1.2.3-59-g8ed1b