10#if defined(SK_BUILD_FOR_ANDROID) && __ANDROID_API__ >= 26
11#define GL_GLEXT_PROTOTYPES
12#define EGL_EGLEXT_PROTOTYPES
16#if !defined(SK_DISABLE_LEGACY_ANDROID_HW_UTILS)
24namespace GrAHardwareBufferUtils {
26SkColorType GetSkColorTypeFromBufferFormat(uint32_t bufferFormat) {
27 return AHardwareBufferUtils::GetSkColorTypeFromBufferFormat(bufferFormat);
30#if !defined(SK_DISABLE_LEGACY_ANDROID_HW_UTILS)
32 uint32_t bufferFormat,
bool requireKnownFormat) {
37 return GetGLBackendFormat(dContext, bufferFormat, requireKnownFormat);
43 return GetVulkanBackendFormat(dContext, hardwareBuffer, bufferFormat, requireKnownFormat);
54 DeleteImageProc* deleteProc,
55 UpdateImageProc* updateProc,
56 TexImageCtx* imageCtx,
57 bool isProtectedContent,
60 bool fromAndroidWindow) {
68 return MakeGLBackendTexture(dContext, hardwareBuffer,
width,
height, deleteProc,
69 updateProc, imageCtx, isProtectedContent, backendFormat,
77 return MakeVulkanBackendTexture(dContext, hardwareBuffer,
width,
height, deleteProc,
78 updateProc, imageCtx, isProtectedContent, backendFormat,
79 isRenderable, fromAndroidWindow);
struct AHardwareBuffer AHardwareBuffer
SK_API GrBackendApi backend() const
bool abandoned() override