Edit

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

Branch :

  • Show log

    Commit

  • Author : Geoff Lang
    Date : 2018-09-20 15:59:54
    Hash : 3fd0b2db
    Message : Implement EGL_ANDROID_get_native_client_buffer. BUG=angleproject:2508 Change-Id: I21e6251cd1341c1f85f1ba16ba08f5876a8ff8de Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1238885 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>

  • 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);
    
    AHardwareBuffer *ANativeWindowBufferToAHardwareBuffer(ANativeWindowBuffer *windowBuffer);
    
    }  // namespace android
    }  // namespace angle
    
    #endif  // COMMON_ANDROIDUTIL_H_