Hash :
8d23f34e
Author :
Date :
2023-01-18T16:20:05
Reland: DisplayEGL should support targeting specific EGL platforms This is a reland of 01c641d58c7b4e4809163e48f570145af89c4acc Updated changes: The value is used only if non-zero and marked as one of the supported platforms. For the moment the only platform listed as supported is EGL_PLATFORM_SURFACELESS_MESA since it's the only relevant platform value that the EGL_ANGLE_platform_angle extension is listing as acceptable value for the EGL_PLATFORM_ANGLE_NATIVE_PLATFORM_TYPE_ANGLE attribute. When validated, and with relevant EGL extensions listed in the client EGL extensions list, a display object for the desired EGL platform is retrieved through the eglGetPlatformDisplayEXT entrypoint. Original change's description: > DisplayEGL should support targeting specific EGL platforms > > DisplayEGL should use the EGL_PLATFORM_ANGLE_NATIVE_PLATFORM_TYPE_ANGLE > value, if provided, to target specific platforms when constructing the > native EGL display. > > The value is retrieved from the display attributes map and propagated > to FunctionsEGL::initialize(). If non-zero, and if the > eglGetPlatformDisplayEXT entrypoint is successfully loaded, then a > display object for the desired EGL platform is retrieved. > > Bug: angleproject:7942 > Change-Id: I3d8dd70c4c5c80259ae647dce039cfe741b0cf7d > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4152531 > Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Bug: angleproject:7942 Change-Id: I75212b48e0e0edceef92e38bf68791017fb30a56 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4178310 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
//
// Copyright 2016 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// FunctionsEGL.h: Implements FunctionsEGL with dlopen/dlsym/dlclose
#ifndef LIBANGLE_RENDERER_GL_CROS_FUNCTIONSEGLDL_H_
#define LIBANGLE_RENDERER_GL_CROS_FUNCTIONSEGLDL_H_
#include "libANGLE/renderer/gl/egl/FunctionsEGL.h"
#include "libANGLE/renderer/gl/egl/functionsegl_typedefs.h"
namespace rx
{
class FunctionsEGLDL : public FunctionsEGL
{
public:
FunctionsEGLDL();
~FunctionsEGLDL() override;
egl::Error initialize(EGLAttrib platformType,
EGLNativeDisplayType nativeDisplay,
const char *libName,
void *eglHandle);
void *getProcAddress(const char *name) const override;
private:
PFNEGLGETPROCADDRESSPROC mGetProcAddressPtr;
};
} // namespace rx
#endif // LIBANGLE_RENDERER_GL_CROS_FUNCTIONSEGLDL_H_