xref: /OK3568_Linux_fs/external/xserver/glamor/glamor_egl_stubs.c (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * Copyright © 2013 Intel Corporation
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice (including the next
12  * paragraph) shall be included in all copies or substantial portions of the
13  * Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21  * IN THE SOFTWARE.
22  */
23 
24 /** @file glamor_egl_stubs.c
25  *
26  * Stubbed out glamor_egl.c functions for servers other than Xorg.
27  */
28 
29 #include "dix-config.h"
30 
31 #include "glamor.h"
32 
33 #ifdef GLAMOR_HAS_GBM_MAP
34 #include "gbm.h"
35 #endif
36 
37 void
glamor_egl_screen_init(ScreenPtr screen,struct glamor_context * glamor_ctx)38 glamor_egl_screen_init(ScreenPtr screen, struct glamor_context *glamor_ctx)
39 {
40 }
41 
42 int
glamor_egl_fd_name_from_pixmap(ScreenPtr screen,PixmapPtr pixmap,CARD16 * stride,CARD32 * size)43 glamor_egl_fd_name_from_pixmap(ScreenPtr screen,
44                                PixmapPtr pixmap,
45                                CARD16 *stride, CARD32 *size)
46 {
47     return -1;
48 }
49 
50 
51 int
glamor_egl_fds_from_pixmap(ScreenPtr screen,PixmapPtr pixmap,int * fds,uint32_t * offsets,uint32_t * strides,uint64_t * modifier)52 glamor_egl_fds_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, int *fds,
53                            uint32_t *offsets, uint32_t *strides,
54                            uint64_t *modifier)
55 {
56     return 0;
57 }
58 
59 int
glamor_egl_fd_from_pixmap(ScreenPtr screen,PixmapPtr pixmap,CARD16 * stride,CARD32 * size)60 glamor_egl_fd_from_pixmap(ScreenPtr screen, PixmapPtr pixmap,
61                           CARD16 *stride, CARD32 *size)
62 {
63     return -1;
64 }
65 
66 struct gbm_bo *
glamor_gbm_bo_from_pixmap(ScreenPtr screen,PixmapPtr pixmap)67 glamor_gbm_bo_from_pixmap(ScreenPtr screen, PixmapPtr pixmap)
68 {
69     return NULL;
70 }
71 
72 #ifdef GLAMOR_HAS_GBM_MAP
73 __attribute__((weak)) void *
gbm_bo_map(struct gbm_bo * bo,uint32_t x,uint32_t y,uint32_t width,uint32_t height,uint32_t flags,uint32_t * stride,void ** mp_data)74 gbm_bo_map(struct gbm_bo *bo,
75            uint32_t x, uint32_t y, uint32_t width, uint32_t height,
76            uint32_t flags, uint32_t *stride, void **mp_data)
77 {
78     return NULL;
79 }
80 #endif
81