Commit 4c4cc3ec authored by Maksim Sisov's avatar Maksim Sisov Committed by Commit Bot

X11 and Ozone: gl: fix use_x11 && use_ozone build.

Even though, this config is not in the upstream yet, there are many
patches that allow to build with use_x11 && use_ozone. The
https://crrev.com/c/2361502 broke the build and my cq dry run.

Thus, fixing the problem with this patch.

Bug: 1085700
Change-Id: Id64052453811c6928b55a1ed62340ace667fe0af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2366797
Commit-Queue: Maksim Sisov (GMT+3) <msisov@igalia.com>
Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800493}
parent d35cd337
...@@ -263,6 +263,7 @@ component("gl") { ...@@ -263,6 +263,7 @@ component("gl") {
] ]
deps += [ deps += [
"//ui/base:features",
"//ui/base/x", "//ui/base/x",
"//ui/events/platform/x11:x11", "//ui/events/platform/x11:x11",
] ]
......
...@@ -24,4 +24,7 @@ specific_include_rules = { ...@@ -24,4 +24,7 @@ specific_include_rules = {
"gl_surface_egl_unittest.cc": [ "gl_surface_egl_unittest.cc": [
"+ui/platform_window", "+ui/platform_window",
], ],
"gl_image_egl_pixmap.cc": [
"+ui/base/ui_base_features.h",
],
} }
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "base/logging.h" #include "base/logging.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "ui/base/ui_base_features.h"
#include "ui/gfx/x/x11.h" #include "ui/gfx/x/x11.h"
#include "ui/gl/buffer_format_utils.h" #include "ui/gl/buffer_format_utils.h"
#include "ui/gl/gl_bindings.h" #include "ui/gl/gl_bindings.h"
...@@ -18,8 +19,11 @@ namespace gl { ...@@ -18,8 +19,11 @@ namespace gl {
inline EGLDisplay FromXDisplay() { inline EGLDisplay FromXDisplay() {
#if defined(USE_X11) #if defined(USE_X11)
if (auto* x_display = gfx::GetXDisplay()) if (!features::IsUsingOzonePlatform()) {
return eglGetDisplay(x_display); if (auto* x_display = gfx::GetXDisplay()) {
return eglGetDisplay(reinterpret_cast<EGLNativeDisplayType>(x_display));
}
}
#endif #endif
return EGL_NO_DISPLAY; return EGL_NO_DISPLAY;
} }
......
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