x_util.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef GPU_IPC_SERVICE_X_UTIL_H_
  5. #define GPU_IPC_SERVICE_X_UTIL_H_
  6. // Some X-Windows specific stuff. This can be included on any platform, and will
  7. // be a NOP on non-Linux ones.
  8. #include "build/build_config.h"
  9. #include "gpu/ipc/service/gpu_config.h"
  10. #if BUILDFLAG(IS_LINUX)
  11. #include "ui/ozone/buildflags.h"
  12. #endif
  13. #if BUILDFLAG(IS_LINUX)
  14. #if BUILDFLAG(OZONE_PLATFORM_X11)
  15. namespace gpu {
  16. // Forward declares ------------------------------------------------------------
  17. //
  18. // X Windows headers do a lot of evil stuff, like "#define Status int" which
  19. // will cause many problems when combined with our other header files (like
  20. // ones that define a class local enum called "Status."
  21. //
  22. // These definitions are not Kosher, but allow us to remove this dependency and
  23. // actually compile X at all.
  24. typedef unsigned long XID;
  25. extern "C" {
  26. typedef struct _XDisplay Display;
  27. typedef struct __GLXcontextRec *GLXContext;
  28. } // extern "C"
  29. } // namespace gpu
  30. #endif // BUILDFLAG(OZONE_PLATFORM_X11)
  31. #endif // BUILDFLAG(IS_LINUX)
  32. #endif // GPU_IPC_SERVICE_X_UTIL_H_