Commit cfe4f098 authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

Replace X11 includes in viz with ui/gfx/x/x11.h

X11 header files are infamous for creating macros with common
names such as None, True, False, Status, Bool, ...

To save oursaves the mess that creates, they are now wrapped
in a header, ui/gfx/x/x11.h, which puts those symbols in the
x11 namespace and removes the global macros.

Bug: 782184
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Ida4d26422f44edda1a0120f52ffbaa4e437ab012
Reviewed-on: https://chromium-review.googlesource.com/805814Reviewed-by: default avatardanakj <danakj@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#521740}
parent 1ec832c7
......@@ -4,8 +4,6 @@
#include "components/viz/service/display_embedder/software_output_device_x11.h"
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
......@@ -13,6 +11,7 @@
#include "third_party/skia/include/core/SkImageInfo.h"
#include "ui/base/x/x11_util.h"
#include "ui/base/x/x11_util_internal.h"
#include "ui/gfx/x/x11.h"
#include "ui/gfx/x/x11_types.h"
namespace viz {
......
......@@ -5,13 +5,12 @@
#ifndef COMPONENTS_VIZ_SERVICE_DISPLAY_EMBEDDER_SOFTWARE_OUTPUT_DEVICE_X11_H_
#define COMPONENTS_VIZ_SERVICE_DISPLAY_EMBEDDER_SOFTWARE_OUTPUT_DEVICE_X11_H_
#include <X11/Xlib.h>
#include "base/macros.h"
#include "base/threading/thread_checker.h"
#include "components/viz/service/display/software_output_device.h"
#include "components/viz/service/viz_service_export.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/x/x11.h"
#include "ui/gfx/x/x11_types.h"
namespace viz {
......
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