diff options
author | Derek Sollenberger <djsollen@google.com> | 2017-06-27 15:37:25 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-27 20:28:13 +0000 |
commit | 7a86987815be3af78fe3801d4f347ebb0c63141a (patch) | |
tree | 27a2eec9280db82617aed10b8f682de036e2e6f1 /src/gpu/GrAHardwareBufferImageGenerator.cpp | |
parent | 3921ba236f1e3320b5999fe472f0acfbb6b6f75a (diff) |
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>
Diffstat (limited to 'src/gpu/GrAHardwareBufferImageGenerator.cpp')
-rw-r--r-- | src/gpu/GrAHardwareBufferImageGenerator.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gpu/GrAHardwareBufferImageGenerator.cpp b/src/gpu/GrAHardwareBufferImageGenerator.cpp index 50ef50e923..8f6cb886e9 100644 --- a/src/gpu/GrAHardwareBufferImageGenerator.cpp +++ b/src/gpu/GrAHardwareBufferImageGenerator.cpp @@ -6,13 +6,14 @@ */ #include "SkTypes.h" -//TODO: This define is temporary and we will compile with NDK after -//TODO: Skia bug 6672 is resolved. -#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK + +#if defined(SK_BUILD_FOR_ANDROID) && __ANDROID_API__ >= 26 #define GL_GLEXT_PROTOTYPES #define EGL_EGLEXT_PROTOTYPES #include "GrAHardwareBufferImageGenerator.h" +#include <android/hardware_buffer.h> + #include "GrBackendSurface.h" #include "GrContext.h" #include "GrContextPriv.h" @@ -65,8 +66,7 @@ std::unique_ptr<SkImageGenerator> GrAHardwareBufferImageGenerator::Make( GrAHardwareBufferImageGenerator::GrAHardwareBufferImageGenerator(const SkImageInfo& info, AHardwareBuffer* graphicBuffer, SkAlphaType alphaType) : INHERITED(info) - , fGraphicBuffer(graphicBuffer) - , fAlphaType(alphaType) { + , fGraphicBuffer(graphicBuffer) { AHardwareBuffer_acquire(fGraphicBuffer); } |