Use the NDK headers for AHardwareBuffer.
Bug: 6672
Change-Id: I5abd86149e912d91234853109ebd2a6b0ac5eaa2
Reviewed-on: https://skia-review.googlesource.com/20980
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 6ead044..7595076 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -486,6 +486,11 @@
libs = []
if (is_android) {
sources += [ "src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp" ]
+
+ # this lib is required to link against AHardwareBuffer
+ if (defined(ndk_api) && ndk_api >= 26) {
+ libs += [ "android" ]
+ }
} else if (skia_use_egl) {
sources += [ "src/gpu/gl/egl/GrGLCreateNativeInterface_egl.cpp" ]
libs += [ "EGL" ]