Hash :
a3cf06ac
Author :
Date :
2020-03-12T13:15:48
EGL: populate EGL_NATIVE_VISUAL_ID values for Android When generating the default EGL configs, populate EGL_NATIVE_VISUAL_ID with AHARDWAREBUFFER formats. Bug: angleproject:4469 Change-Id: Ifde9df0497cbd4e01219ab6067acd8d97f8460e4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2101577 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
//
// Copyright 2018 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// android_util.h: Utilities for the using the Android platform
#ifndef COMMON_ANDROIDUTIL_H_
#define COMMON_ANDROIDUTIL_H_
#include <EGL/egl.h>
#include "angle_gl.h"
struct ANativeWindowBuffer;
struct AHardwareBuffer;
namespace angle
{
namespace android
{
ANativeWindowBuffer *ClientBufferToANativeWindowBuffer(EGLClientBuffer clientBuffer);
EGLClientBuffer AHardwareBufferToClientBuffer(const AHardwareBuffer *hardwareBuffer);
void GetANativeWindowBufferProperties(const ANativeWindowBuffer *buffer,
int *width,
int *height,
int *depth,
int *pixelFormat);
GLenum NativePixelFormatToGLInternalFormat(int pixelFormat);
int GLInternalFormatToNativePixelFormat(GLenum internalFormat);
AHardwareBuffer *ANativeWindowBufferToAHardwareBuffer(ANativeWindowBuffer *windowBuffer);
} // namespace android
} // namespace angle
#endif // COMMON_ANDROIDUTIL_H_