]> git.cworth.org Git - apitrace/blob - helpers/eglsize.hpp
edb2fa64734a6df3aa780db26183c1eb6bd7728a
[apitrace] / helpers / eglsize.hpp
1
2 /*********************************************************************
3  *
4  * Copyright 2012 Intel Corporation
5  * All Rights Reserved.
6  *
7  * Permission is hereby granted, free of charge, to any person
8  * obtaining a copy of this software and associated documentation
9  * files (the "Software"), to deal in the Software without
10  * restriction, including without limitation the rights to use, copy,
11  * modify, merge, publish, distribute, sublicense, and/or sell copies
12  * of the Software, and to permit persons to whom the Software is
13  * furnished to do so, subject to the following conditions:
14  *
15  * The above copyright notice and this permission notice shall be
16  * included in all copies or substantial portions of the Software.
17  *
18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
22  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
23  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25  * SOFTWARE.
26  *
27  *********************************************************************/
28
29 /*
30  * Auxiliary functions to compute the size of array/blob arguments.
31  */
32 #ifndef _EGLSIZE_HPP_
33 #define _EGLSIZE_HPP_
34
35 struct image_info
36 {
37     int width;
38     int height;
39 };
40
41 struct image_blob
42 {
43     struct image_info info;
44     char data[1];
45 };
46
47 void
48 _eglDestroyImageKHR_epilog(EGLImageKHR image);
49
50 void
51 _eglCreateImageKHR_epilog(EGLDisplay dpy, EGLContext ctx, EGLenum target,
52                             EGLClientBuffer buffer, const EGLint *attrib_list,
53                             EGLImageKHR image);
54
55 size_t
56 _glEGLImageTargetTexture2DOES_size(GLint target, EGLImageKHR image);
57
58 void *
59 _glEGLImageTargetTexture2DOES_get_ptr(GLenum target, EGLImageKHR image);
60
61 void
62 _glEGLImageTargetTexture2DOES_put_ptr(const void *buffer);
63
64 #endif