chromium/ui/base/x/x11_gl_egl_utility.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ui/base/x/x11_gl_egl_utility.h"

#include "base/containers/contains.h"
#include "ui/base/x/x11_util.h"
#include "ui/gfx/x/visual_manager.h"
#include "ui/gl/gl_surface_egl.h"

#ifndef EGL_ANGLE_x11_visual
#define EGL_ANGLE_x11_visual
#define EGL_X11_VISUAL_ID_ANGLE
#endif /* EGL_ANGLE_x11_visual */

#ifndef EGL_ANGLE_platform_angle_null
#define EGL_ANGLE_platform_angle_null
#define EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE
#endif /* EGL_ANGLE_platform_angle_null */

#ifndef EGL_PLATFORM_ANGLE_NATIVE_PLATFORM_TYPE_ANGLE
#define EGL_PLATFORM_ANGLE_NATIVE_PLATFORM_TYPE_ANGLE
#endif

#ifndef EGL_PLATFORM_ANGLE_DEVICE_TYPE_SWIFTSHADER_ANGLE
#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_SWIFTSHADER_ANGLE
#endif

#ifndef EGL_ANGLE_platform_angle
#define EGL_ANGLE_platform_angle
#define EGL_PLATFORM_ANGLE_NATIVE_PLATFORM_TYPE_ANGLE
#endif /* EGL_ANGLE_platform_angle */

#ifndef EGL_EXT_platform_x11
#define EGL_EXT_platform_x11
#define EGL_PLATFORM_X11_EXT
#endif /* EGL_EXT_platform_x11 */

namespace ui {

void GetPlatformExtraDisplayAttribs(EGLenum platform_type,
                                    std::vector<EGLAttrib>* attributes) {}

void ChoosePlatformCustomAlphaAndBufferSize(EGLint* alpha_size,
                                            EGLint* buffer_size) {}

}  // namespace ui