#include "libANGLE/renderer/gl/egl/DisplayEGL.h"
#include "common/debug.h"
#include "common/system_utils.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/egl/ContextEGL.h"
#include "libANGLE/renderer/gl/egl/DeviceEGL.h"
#include "libANGLE/renderer/gl/egl/DmaBufImageSiblingEGL.h"
#include "libANGLE/renderer/gl/egl/FunctionsEGLDL.h"
#include "libANGLE/renderer/gl/egl/ImageEGL.h"
#include "libANGLE/renderer/gl/egl/PbufferSurfaceEGL.h"
#include "libANGLE/renderer/gl/egl/RendererEGL.h"
#include "libANGLE/renderer/gl/egl/SyncEGL.h"
#include "libANGLE/renderer/gl/egl/WindowSurfaceEGL.h"
#include "libANGLE/renderer/gl/renderergl_utils.h"
namespace
{
rx::RobustnessVideoMemoryPurgeStatus GetRobustnessVideoMemoryPurge(const egl::AttributeMap &attribs)
{ … }
std::vector<EGLint> RenderableTypesFromPlatformAttrib(const rx::FunctionsEGL *egl,
const EGLAttrib platformAttrib)
{ … }
template <typename... Rest>
egl::AttributeMap MergeAttributeMaps(const egl::AttributeMap &a)
{ … }
template <typename... Rest>
egl::AttributeMap MergeAttributeMaps(const egl::AttributeMap &a, Rest... rest)
{ … }
}
namespace rx
{
DisplayEGL::DisplayEGL(const egl::DisplayState &state) : … { … }
DisplayEGL::~DisplayEGL() { … }
ImageImpl *DisplayEGL::createImage(const egl::ImageState &state,
const gl::Context *context,
EGLenum target,
const egl::AttributeMap &attribs)
{ … }
EGLSyncImpl *DisplayEGL::createSync()
{ … }
const char *DisplayEGL::getEGLPath() const
{ … }
egl::Error DisplayEGL::initializeContext(EGLContext shareContext,
const egl::AttributeMap &eglAttributes,
EGLContext *outContext) const
{ … }
egl::Error DisplayEGL::findConfig(egl::Display *display,
bool forMockPbuffer,
EGLConfig *outConfig,
std::vector<EGLint> *outConfigAttribs)
{ … }
egl::Error DisplayEGL::initialize(egl::Display *display)
{ … }
void DisplayEGL::terminate()
{ … }
SurfaceImpl *DisplayEGL::createWindowSurface(const egl::SurfaceState &state,
EGLNativeWindowType window,
const egl::AttributeMap &attribs)
{ … }
SurfaceImpl *DisplayEGL::createPbufferSurface(const egl::SurfaceState &state,
const egl::AttributeMap &attribs)
{ … }
class ExternalSurfaceEGL : public SurfaceEGL
{ … };
SurfaceImpl *DisplayEGL::createPbufferFromClientBuffer(const egl::SurfaceState &state,
EGLenum buftype,
EGLClientBuffer clientBuffer,
const egl::AttributeMap &attribs)
{ … }
SurfaceImpl *DisplayEGL::createPixmapSurface(const egl::SurfaceState &state,
NativePixmapType nativePixmap,
const egl::AttributeMap &attribs)
{ … }
ContextImpl *DisplayEGL::createContext(const gl::State &state,
gl::ErrorSet *errorSet,
const egl::Config *configuration,
const gl::Context *shareContext,
const egl::AttributeMap &attribs)
{ … }
template <typename T>
void DisplayEGL::getConfigAttrib(EGLConfig config, EGLint attribute, T *value) const
{ … }
template <typename T, typename U>
void DisplayEGL::getConfigAttribIfExtension(EGLConfig config,
EGLint attribute,
T *value,
const char *extension,
const U &defaultValue) const
{ … }
egl::ConfigSet DisplayEGL::generateConfigs()
{ … }
bool DisplayEGL::testDeviceLost()
{ … }
egl::Error DisplayEGL::restoreLostDevice(const egl::Display *display)
{ … }
bool DisplayEGL::isValidNativeWindow(EGLNativeWindowType window) const
{ … }
egl::Error DisplayEGL::validateClientBuffer(const egl::Config *configuration,
EGLenum buftype,
EGLClientBuffer clientBuffer,
const egl::AttributeMap &attribs) const
{ … }
egl::Error DisplayEGL::waitClient(const gl::Context *context)
{ … }
egl::Error DisplayEGL::waitNative(const gl::Context *context, EGLint engine)
{ … }
egl::Error DisplayEGL::makeCurrent(egl::Display *display,
egl::Surface *drawSurface,
egl::Surface *readSurface,
gl::Context *context)
{ … }
gl::Version DisplayEGL::getMaxSupportedESVersion() const
{ … }
void DisplayEGL::destroyNativeContext(EGLContext context)
{ … }
void DisplayEGL::generateExtensions(egl::DisplayExtensions *outExtensions) const
{ … }
void DisplayEGL::generateCaps(egl::Caps *outCaps) const
{ … }
void DisplayEGL::setBlobCacheFuncs(EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get)
{ … }
egl::Error DisplayEGL::makeCurrentSurfaceless(gl::Context *context)
{ … }
egl::Error DisplayEGL::createRenderer(EGLContext shareContext,
bool makeNewContextCurrent,
bool isExternalContext,
std::shared_ptr<RendererEGL> *outRenderer)
{ … }
void DisplayEGL::initializeFrontendFeatures(angle::FrontendFeatures *features) const
{ … }
void DisplayEGL::populateFeatureList(angle::FeatureList *features)
{ … }
RendererGL *DisplayEGL::getRenderer() const
{ … }
egl::Error DisplayEGL::validateImageClientBuffer(const gl::Context *context,
EGLenum target,
EGLClientBuffer clientBuffer,
const egl::AttributeMap &attribs) const
{ … }
ExternalImageSiblingImpl *DisplayEGL::createExternalImageSibling(const gl::Context *context,
EGLenum target,
EGLClientBuffer buffer,
const egl::AttributeMap &attribs)
{ … }
EGLint DisplayEGL::fixSurfaceType(EGLint surfaceType) const
{ … }
const FunctionsEGL *DisplayEGL::getFunctionsEGL() const
{ … }
DeviceImpl *DisplayEGL::createDevice()
{ … }
bool DisplayEGL::supportsDmaBufFormat(EGLint format) const
{ … }
egl::Error DisplayEGL::queryDmaBufFormats(EGLint maxFormats, EGLint *formats, EGLint *numFormats)
{ … }
egl::Error DisplayEGL::queryDmaBufModifiers(EGLint drmFormat,
EGLint maxModifiers,
EGLuint64KHR *modifiers,
EGLBoolean *externalOnly,
EGLint *numModifiers)
{ … }
}