Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2abc5ab3 authored by Mathias Agopian's avatar Mathias Agopian Committed by Android (Google) Code Review
Browse files

Merge "clean-up EGL includes"

parents 6646f552 311b479d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -17,6 +17,9 @@
#define LOG_TAG "GraphicBuffer"

#include <ui/GraphicBuffer.h>

#include <cutils/atomic.h>

#include <ui/GrallocMapper.h>
#include <ui/GraphicBufferAllocator.h>
#include <ui/GraphicBufferMapper.h>
+10 −15
Original line number Diff line number Diff line
@@ -17,26 +17,21 @@
//#define LOG_NDEBUG 0
#define ATRACE_TAG ATRACE_TAG_GRAPHICS

#include <array>
#include <ctype.h>
#include "Loader.h"

#include <dirent.h>
#include <dlfcn.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <android/dlext.h>
#include <cutils/properties.h>
#include <log/log.h>

#include <utils/String8.h>
#include <utils/Trace.h>
#include <ui/GraphicsEnv.h>

#include <EGL/egl.h>
#include <ui/GraphicsEnv.h>

#include "egldefs.h"
#include "Loader.h"

// ----------------------------------------------------------------------------
namespace android {
@@ -437,10 +432,10 @@ static void* do_android_dlopen_ext(const char* path, int mode, const android_dle
    return android_dlopen_ext(path, mode, info);
}

static const std::array<const char*, 2> HAL_SUBNAME_KEY_PROPERTIES = {{
static const char* HAL_SUBNAME_KEY_PROPERTIES[2] = {
    "ro.hardware.egl",
    "ro.board.platform",
}};
};

static void* load_updated_driver(const char* kind, android_namespace_t* ns) {
    ATRACE_CALL();
@@ -454,12 +449,12 @@ static void* load_updated_driver(const char* kind, android_namespace_t* ns) {
        if (property_get(key, prop, nullptr) > 0) {
            String8 name;
            name.appendFormat("lib%s_%s.so", kind, prop);
            so = do_android_dlopen_ext(name.string(), RTLD_LOCAL | RTLD_NOW,
                    &dlextinfo);
            if (so)
            so = do_android_dlopen_ext(name.string(), RTLD_LOCAL | RTLD_NOW, &dlextinfo);
            if (so) {
                return so;
            }
        }
    }
    return nullptr;
}

+3 −8
Original line number Diff line number Diff line
@@ -17,13 +17,10 @@
#ifndef ANDROID_EGL_LOADER_H
#define ANDROID_EGL_LOADER_H

#include <ctype.h>
#include <string.h>
#include <errno.h>
#include <stdint.h>

#include <utils/Errors.h>
#include <utils/Singleton.h>
#include <utils/String8.h>

#include <EGL/egl.h>

@@ -33,12 +30,10 @@ namespace android {

struct egl_connection_t;

class Loader : public Singleton<Loader>
{
class Loader : public Singleton<Loader> {
    friend class Singleton<Loader>;

    typedef __eglMustCastToProperFunctionPointerType (*getProcAddressType)(
            const char*);
    typedef __eglMustCastToProperFunctionPointerType (* getProcAddressType)(const char*);
   
    enum {
        EGL         = 0x01,
+4 −8
Original line number Diff line number Diff line
@@ -14,30 +14,26 @@
 ** limitations under the License.
 */

#include <ctype.h>
#include <stdlib.h>
#include <string.h>

#include <hardware/gralloc.h>
#include <system/window.h>

#include <EGL/egl.h>
#include <EGL/eglext.h>

#include <cutils/atomic.h>
#include <cutils/properties.h>

#include <log/log.h>

#include <utils/CallStack.h>
#include <utils/String8.h>

#include "../egl_impl.h"

#include "egl_tls.h"
#include "egldefs.h"
#include "Loader.h"

#include "egl_tls.h"
#include "egl_display.h"
#include "egl_object.h"
#include "Loader.h"

typedef __eglMustCastToProperFunctionPointerType EGLFuncPointer;

+6 −12
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@
#include <string.h>

#include <hardware/gralloc1.h>
#include <system/window.h>

#include <EGL/egl.h>
#include <EGL/eglext.h>
@@ -30,9 +29,7 @@
#include <android/hardware_buffer.h>
#include <private/android/AHardwareBufferHelpers.h>

#include <cutils/atomic.h>
#include <cutils/compiler.h>
#include <cutils/memory.h>
#include <cutils/properties.h>
#include <log/log.h>

@@ -44,18 +41,17 @@
#include <utils/KeyedVector.h>
#include <utils/String8.h>
#include <utils/Trace.h>
#include <utils/Thread.h>

#include "binder/Binder.h"
#include "binder/Parcel.h"
#include "binder/IServiceManager.h"

#include "../egl_impl.h"
#include "../hooks.h"

#include "egl_display.h"
#include "egl_object.h"
#include "egl_tls.h"
#include "egldefs.h"

using namespace android;

@@ -84,11 +80,10 @@ struct extention_map_t {
 * NOTE: Both strings MUST have a single space as the last character.
 */

// CLion mistakenly warns about the extern keyword below.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wextern-initializer"
extern char const * const gBuiltinExtensionString;
extern char const * const gExtensionString;

extern char const * const gBuiltinExtensionString =
char const * const gBuiltinExtensionString =
        "EGL_KHR_get_all_proc_addresses "
        "EGL_ANDROID_presentation_time "
        "EGL_KHR_swap_buffers_with_damage "
@@ -97,7 +92,8 @@ extern char const * const gBuiltinExtensionString =
        "EGL_ANDROID_front_buffer_auto_refresh "
        "EGL_ANDROID_get_frame_timestamps "
        ;
extern char const * const gExtensionString  =

char const * const gExtensionString  =
        "EGL_KHR_image "                        // mandatory
        "EGL_KHR_image_base "                   // mandatory
        "EGL_KHR_image_pixmap "
@@ -237,8 +233,6 @@ static const extention_map_t sExtensionMap[] = {
            (__eglMustCastToProperFunctionPointerType)&eglGetFrameTimestampSupportedANDROID },
};

#pragma clang diagnostic pop

/*
 * These extensions entry-points should not be exposed to applications.
 * They're used internally by the Android EGL layer.
Loading