summaryrefslogtreecommitdiffstats
path: root/content/common/gpu/x_util.h
blob: 99687566356f88386158569d2dd3ff1afd99dce6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CONTENT_COMMON_GPU_X_UTIL_H_
#define CONTENT_COMMON_GPU_X_UTIL_H_

// Some X-Windows specific stuff. This can be included on any platform, and will
// be a NOP on non-Linux ones.

#include "build/build_config.h"
#include "content/common/gpu/gpu_config.h"

#if defined(USE_X11)

namespace content {

// Forward declares ------------------------------------------------------------
//
// X Windows headers do a lot of evil stuff, like "#define Status int" which
// will cause many problems when combined with our other header files (like
// ones that define a class local enum called "Status."
//
// These definitions are not Kosher, but allow us to remove this dependency and
// actually compile X at all.

typedef unsigned long XID;

extern "C" {

typedef struct _XDisplay Display;
typedef struct __GLXcontextRec *GLXContext;

}  // extern "C"

}  // namespace content

#endif  // USE_X11

#endif  // CONTENT_COMMON_GPU_X_UTIL_H_