#include "libANGLE/renderer/gl/egl/FunctionsEGL.h"
#include <algorithm>
#include "common/platform.h"
#include "common/string_utils.h"
#include "libANGLE/renderer/driver_utils.h"
#include "libANGLE/renderer/gl/FunctionsGL.h"
#include "libANGLE/renderer/gl/egl/functionsegl_typedefs.h"
#if defined(ANGLE_HAS_LIBDRM)
#include <fcntl.h>
#include <unistd.h>
#include <xf86drm.h>
#endif
namespace
{
template <typename T>
bool SetPtr(T *dst, void *src)
{ … }
bool IsValidPlatformTypeForPlatformDisplayConnection(EGLAttrib platformType)
{ … }
}
namespace rx
{
struct FunctionsEGL::EGLDispatchTable
{ … };
FunctionsEGL::FunctionsEGL()
: … { … }
FunctionsEGL::~FunctionsEGL()
{ … }
egl::Error FunctionsEGL::initialize(EGLAttrib platformType, EGLNativeDisplayType nativeDisplay)
{ … }
egl::Error FunctionsEGL::terminate()
{ … }
bool FunctionsEGL::queryExtensions()
{ … }
EGLDisplay FunctionsEGL::getPlatformDisplay(EGLAttrib platformType,
EGLNativeDisplayType nativeDisplay)
{ … }
std::vector<EGLDeviceEXT> FunctionsEGL::queryDevices(int *major, int *minor)
{ … }
EGLDisplay FunctionsEGL::getNativeDisplay(int *major, int *minor)
{ … }
#if defined(ANGLE_HAS_LIBDRM)
EGLDeviceEXT FunctionsEGL::getPreferredEGLDevice(const std::vector<EGLDeviceEXT> &devices)
{ … }
EGLDisplay FunctionsEGL::getPreferredDisplay(int *major, int *minor)
{ … }
#endif
class FunctionsGLEGL : public FunctionsGL
{ … };
FunctionsGL *FunctionsEGL::makeFunctionsGL(void) const
{ … }
bool FunctionsEGL::hasExtension(const char *extension) const
{ … }
bool FunctionsEGL::hasDmaBufImportModifierFunctions() const
{ … }
EGLDisplay FunctionsEGL::getDisplay() const
{ … }
EGLint FunctionsEGL::getError() const
{ … }
EGLBoolean FunctionsEGL::chooseConfig(EGLint const *attribList,
EGLConfig *configs,
EGLint configSize,
EGLint *numConfig) const
{ … }
EGLBoolean FunctionsEGL::getConfigs(EGLConfig *configs,
EGLint config_size,
EGLint *num_config) const
{ … }
EGLBoolean FunctionsEGL::getConfigAttrib(EGLConfig config, EGLint attribute, EGLint *value) const
{ … }
EGLSurface FunctionsEGL::getCurrentSurface(EGLint readdraw) const
{ … }
EGLContext FunctionsEGL::createContext(EGLConfig config,
EGLContext share_context,
EGLint const *attrib_list) const
{ … }
EGLSurface FunctionsEGL::createPbufferSurface(EGLConfig config, const EGLint *attrib_list) const
{ … }
EGLSurface FunctionsEGL::createWindowSurface(EGLConfig config,
EGLNativeWindowType win,
const EGLint *attrib_list) const
{ … }
EGLBoolean FunctionsEGL::destroyContext(EGLContext context) const
{ … }
EGLBoolean FunctionsEGL::destroySurface(EGLSurface surface) const
{ … }
EGLBoolean FunctionsEGL::makeCurrent(EGLSurface surface, EGLContext context) const
{ … }
char const *FunctionsEGL::queryString(EGLint name) const
{ … }
EGLBoolean FunctionsEGL::querySurface(EGLSurface surface, EGLint attribute, EGLint *value) const
{ … }
EGLBoolean FunctionsEGL::swapBuffers(EGLSurface surface) const
{ … }
EGLBoolean FunctionsEGL::bindTexImage(EGLSurface surface, EGLint buffer) const
{ … }
EGLBoolean FunctionsEGL::releaseTexImage(EGLSurface surface, EGLint buffer) const
{ … }
EGLBoolean FunctionsEGL::surfaceAttrib(EGLSurface surface, EGLint attribute, EGLint value) const
{ … }
EGLBoolean FunctionsEGL::swapInterval(EGLint interval) const
{ … }
EGLContext FunctionsEGL::getCurrentContext() const
{ … }
EGLImageKHR FunctionsEGL::createImageKHR(EGLContext context,
EGLenum target,
EGLClientBuffer buffer,
const EGLint *attrib_list) const
{ … }
EGLBoolean FunctionsEGL::destroyImageKHR(EGLImageKHR image) const
{ … }
EGLSyncKHR FunctionsEGL::createSyncKHR(EGLenum type, const EGLint *attrib_list) const
{ … }
EGLBoolean FunctionsEGL::destroySyncKHR(EGLSyncKHR sync) const
{ … }
EGLint FunctionsEGL::clientWaitSyncKHR(EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout) const
{ … }
EGLBoolean FunctionsEGL::getSyncAttribKHR(EGLSyncKHR sync, EGLint attribute, EGLint *value) const
{ … }
EGLint FunctionsEGL::waitSyncKHR(EGLSyncKHR sync, EGLint flags) const
{ … }
EGLBoolean FunctionsEGL::swapBuffersWithDamageKHR(EGLSurface surface,
const EGLint *rects,
EGLint n_rects) const
{ … }
EGLBoolean FunctionsEGL::presentationTimeANDROID(EGLSurface surface, EGLnsecsANDROID time) const
{ … }
void FunctionsEGL::setBlobCacheFuncsANDROID(EGLSetBlobFuncANDROID set,
EGLGetBlobFuncANDROID get) const
{ … }
EGLBoolean FunctionsEGL::getCompositorTimingSupportedANDROID(EGLSurface surface, EGLint name) const
{ … }
EGLBoolean FunctionsEGL::getCompositorTimingANDROID(EGLSurface surface,
EGLint numTimestamps,
const EGLint *names,
EGLnsecsANDROID *values) const
{ … }
EGLBoolean FunctionsEGL::getNextFrameIdANDROID(EGLSurface surface, EGLuint64KHR *frameId) const
{ … }
EGLBoolean FunctionsEGL::getFrameTimestampSupportedANDROID(EGLSurface surface,
EGLint timestamp) const
{ … }
EGLBoolean FunctionsEGL::getFrameTimestampsANDROID(EGLSurface surface,
EGLuint64KHR frameId,
EGLint numTimestamps,
const EGLint *timestamps,
EGLnsecsANDROID *values) const
{ … }
EGLint FunctionsEGL::dupNativeFenceFDANDROID(EGLSync sync) const
{ … }
EGLint FunctionsEGL::queryDmaBufFormatsEXT(EGLint maxFormats,
EGLint *formats,
EGLint *numFormats) const
{ … }
EGLint FunctionsEGL::queryDmaBufModifiersEXT(EGLint format,
EGLint maxModifiers,
EGLuint64KHR *modifiers,
EGLBoolean *externalOnly,
EGLint *numModifiers) const
{ … }
EGLBoolean FunctionsEGL::queryDeviceAttribEXT(EGLDeviceEXT device,
EGLint attribute,
EGLAttrib *value) const
{ … }
const char *FunctionsEGL::queryDeviceStringEXT(EGLDeviceEXT device, EGLint name) const
{ … }
EGLBoolean FunctionsEGL::queryDisplayAttribEXT(EGLint attribute, EGLAttrib *value) const
{ … }
}