Edit

kc3-lang/angle/src/common/android_util.h

Branch :

  • Show log

    Commit

  • Author : Mohan Maiya
    Date : 2020-03-12 13:15:48
    Hash : a3cf06ac
    Message : 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>

  • src/common/android_util.h
  • //
    // 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_