summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2016-11-16 09:15:12 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-11-18 11:46:27 -0500
commitbd66d3e1bb16bd28880989fcfc1d6f4374b12184 (patch)
tree49de9c58c05999f4bc1138486c75ce63267cacaa
parent117e30310d50fb068b6fb53558f7b02ab21167e8 (diff)
fix missing definition of DRM_FORMAT_XRGB8888
As we do not compile-time link with libdrm inside Ecore_Drm2 anymore, we need to include relivant bits of drm_fourcc header here in order to define DRM_FORMAT_XRGB8888 else we fail to compile Enlightenment Wayland Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/bin/e_alert_main.c54
1 files changed, 43 insertions, 11 deletions
diff --git a/src/bin/e_alert_main.c b/src/bin/e_alert_main.c
index c0cb3c6d7..6de8498ad 100644
--- a/src/bin/e_alert_main.c
+++ b/src/bin/e_alert_main.c
@@ -1,7 +1,7 @@
1#include "config.h" 1#include "config.h"
2 2
3#ifdef HAVE_DRM2 3#ifdef HAVE_DRM2
4# define EFL_BETA_API_SUPPORT 4# define EFL_BETA_API_SUPPORT
5#endif 5#endif
6 6
7#include <stdio.h> 7#include <stdio.h>
@@ -20,17 +20,49 @@
20#include <xcb/shape.h> 20#include <xcb/shape.h>
21#include <X11/keysym.h> 21#include <X11/keysym.h>
22 22
23# ifdef HAVE_WL_DRM 23#ifdef HAVE_WL_DRM
24# include <Ecore_Input.h> 24# include <Ecore_Input.h>
25# ifdef HAVE_DRM2 25# ifdef HAVE_DRM2
26# include <drm_fourcc.h> 26# include <Ecore_Drm2.h>
27# include <Ecore_Drm2.h> 27# else
28# else 28# include <Ecore_Drm.h>
29# include <Ecore_Drm.h>
30# endif
31# include <Evas.h>
32# include <Evas_Engine_Buffer.h>
33# endif 29# endif
30# include <Evas.h>
31# include <Evas_Engine_Buffer.h>
32#endif
33
34#ifdef HAVE_WL_DRM
35# ifdef HAVE_DRM2
36/* DRM_FORMAT_XRGB8888 and fourcc_code borrowed from <drm_fourcc.h>
37 *
38 * Copyright 2011 Intel Corporation
39 *
40 * Permission is hereby granted, free of charge, to any person obtaining a
41 * copy of this software and associated documentation files (the "Software"),
42 * to deal in the Software without restriction, including without limitation
43 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
44 * and/or sell copies of the Software, and to permit persons to whom the
45 * Software is furnished to do so, subject to the following conditions:
46 *
47 * The above copyright notice and this permission notice (including the next
48 * paragraph) shall be included in all copies or substantial portions of the
49 * Software.
50 *
51 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
52 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
53 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
54 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
55 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
56 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
57 * OTHER DEALINGS IN THE SOFTWARE.
58 */
59# define fourcc_code(a, b, c, d) \
60 ((uint32_t)(a) | ((uint32_t)(b) << 8) | \
61 ((uint32_t)(c) << 16) | ((uint32_t)(d) << 24))
62# define DRM_FORMAT_XRGB8888 \
63 fourcc_code('X', 'R', '2', '4') /* [31:0] x:R:G:B 8:8:8:8 little endian */
64# endif
65#endif
34 66
35#define WINDOW_WIDTH 320 67#define WINDOW_WIDTH 320
36#define WINDOW_HEIGHT 240 68#define WINDOW_HEIGHT 240