Commit ba4e2b94 by Maksim Sisov Committed by Commit Bot

Type cast EGLNativeDisplayType to _XDisplay* in xcb and glx

As we are approaching the point when DisplayGLX will be compiled in Ozone/X11 configuration, we need to resolve compilation errors. Ozone has intptr_t EGLNativeDisplayType whereas X11 requires Display* aka _XDisplay*. We've already done so in Chromium, and it's time to do the same cast in angle. Bug: chromium:1084458 Change-Id: I11b5ae2e10bfa316cbaa882be86af6894cfdbbf2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2211761Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent 0638b6b9
......@@ -92,13 +92,13 @@ DisplayGLX::~DisplayGLX() {}
egl::Error DisplayGLX::initialize(egl::Display *display)
{
mEGLDisplay = display;
mXDisplay = display->getNativeDisplayId();
mXDisplay = reinterpret_cast<Display *>(display->getNativeDisplayId());
const auto &attribMap = display->getAttributeMap();
// ANGLE_platform_angle allows the creation of a default display
// using EGL_DEFAULT_DISPLAY (= nullptr). In this case just open
// the display specified by the DISPLAY environment variable.
if (mXDisplay == EGL_DEFAULT_DISPLAY)
if (mXDisplay == reinterpret_cast<Display *>(EGL_DEFAULT_DISPLAY))
{
mUsesNewXDisplay = true;
mXDisplay = XOpenDisplay(nullptr);
......
......@@ -9,6 +9,7 @@
#include "libANGLE/renderer/vulkan/xcb/DisplayVkXcb.h"
#include <X11/Xutil.h>
#include <xcb/xcb.h>
#include "libANGLE/Display.h"
......@@ -125,7 +126,7 @@ DisplayImpl *CreateVulkanXcbDisplay(const egl::DisplayState &state)
angle::Result DisplayVkXcb::waitNativeImpl()
{
XSync(mState.displayId, False);
XSync(reinterpret_cast<Display *>(mState.displayId), False);
return angle::Result::Continue;
}
} // namespace rx
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment