#include <algorithm>
#include <cstring>
#include <fstream>
#include "common/debug.h"
#include "common/system_utils.h"
#include "libANGLE/Config.h"
#include "libANGLE/Context.h"
#include "libANGLE/Display.h"
#include "libANGLE/Surface.h"
#include "libANGLE/renderer/gl/ContextGL.h"
#include "libANGLE/renderer/gl/RendererGL.h"
#include "libANGLE/renderer/gl/renderergl_utils.h"
#include "libANGLE/renderer/gl/glx/DisplayGLX.h"
#include <EGL/eglext.h>
#include "libANGLE/renderer/gl/glx/DisplayGLX_api.h"
#include "libANGLE/renderer/gl/glx/PbufferSurfaceGLX.h"
#include "libANGLE/renderer/gl/glx/PixmapSurfaceGLX.h"
#include "libANGLE/renderer/gl/glx/WindowSurfaceGLX.h"
#include "libANGLE/renderer/gl/glx/glx_utils.h"
namespace
{
rx::RobustnessVideoMemoryPurgeStatus GetRobustnessVideoMemoryPurge(const egl::AttributeMap &attribs)
{ … }
}
namespace rx
{
static int IgnoreX11Errors(Display *, XErrorEvent *)
{ … }
class FunctionsGLGLX : public FunctionsGL
{ … };
DisplayGLX::DisplayGLX(const egl::DisplayState &state)
: … { … }
DisplayGLX::~DisplayGLX() { … }
egl::Error DisplayGLX::initialize(egl::Display *display)
{ … }
void DisplayGLX::terminate()
{ … }
egl::Error DisplayGLX::makeCurrent(egl::Display *display,
egl::Surface *drawSurface,
egl::Surface *readSurface,
gl::Context *context)
{ … }
SurfaceImpl *DisplayGLX::createWindowSurface(const egl::SurfaceState &state,
EGLNativeWindowType window,
const egl::AttributeMap &attribs)
{ … }
SurfaceImpl *DisplayGLX::createPbufferSurface(const egl::SurfaceState &state,
const egl::AttributeMap &attribs)
{ … }
SurfaceImpl *DisplayGLX::createPbufferFromClientBuffer(const egl::SurfaceState &state,
EGLenum buftype,
EGLClientBuffer clientBuffer,
const egl::AttributeMap &attribs)
{ … }
SurfaceImpl *DisplayGLX::createPixmapSurface(const egl::SurfaceState &state,
NativePixmapType nativePixmap,
const egl::AttributeMap &attribs)
{ … }
egl::Error DisplayGLX::validatePixmap(const egl::Config *config,
EGLNativePixmapType pixmap,
const egl::AttributeMap &attributes) const
{ … }
ContextImpl *DisplayGLX::createContext(const gl::State &state,
gl::ErrorSet *errorSet,
const egl::Config *configuration,
const gl::Context *shareContext,
const egl::AttributeMap &attribs)
{ … }
egl::Error DisplayGLX::initializeContext(glx::FBConfig config,
const egl::AttributeMap &eglAttributes,
glx::Context *context)
{ … }
egl::ConfigSet DisplayGLX::generateConfigs()
{ … }
bool DisplayGLX::testDeviceLost()
{ … }
egl::Error DisplayGLX::restoreLostDevice(const egl::Display *display)
{ … }
bool DisplayGLX::isValidNativeWindow(EGLNativeWindowType window) const
{ … }
egl::Error DisplayGLX::waitClient(const gl::Context *context)
{ … }
egl::Error DisplayGLX::waitNative(const gl::Context *context, EGLint engine)
{ … }
gl::Version DisplayGLX::getMaxSupportedESVersion() const
{ … }
void DisplayGLX::syncXCommands(bool alwaysSync) const
{ … }
void DisplayGLX::setSwapInterval(glx::Drawable drawable, SwapControlData *data)
{ … }
bool DisplayGLX::isWindowVisualIdSpecified() const
{ … }
bool DisplayGLX::isMatchingWindowVisualId(unsigned long visualId) const
{ … }
void DisplayGLX::generateExtensions(egl::DisplayExtensions *outExtensions) const
{ … }
void DisplayGLX::generateCaps(egl::Caps *outCaps) const
{ … }
egl::Error DisplayGLX::makeCurrentSurfaceless(gl::Context *context)
{ … }
int DisplayGLX::getGLXFBConfigAttrib(glx::FBConfig config, int attrib) const
{ … }
egl::Error DisplayGLX::createContextAttribs(glx::FBConfig,
const Optional<gl::Version> &version,
int profileMask,
glx::Context *context) const
{ … }
void DisplayGLX::initializeFrontendFeatures(angle::FrontendFeatures *features) const
{ … }
void DisplayGLX::populateFeatureList(angle::FeatureList *features)
{ … }
RendererGL *DisplayGLX::getRenderer() const
{ … }
angle::NativeWindowSystem DisplayGLX::getWindowSystem() const
{ … }
DisplayImpl *CreateGLXDisplay(const egl::DisplayState &state)
{ … }
}