uvtd: seat: implement session IDs
[platform/upstream/kmscon.git] / src / kmscon_mod_gltex.c
1 /*
2  * kmscon - OpenGL Texture based rendering backend module
3  *
4  * Copyright (c) 2011-2013 David Herrmann <dh.herrmann@googlemail.com>
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining
7  * a copy of this software and associated documentation files
8  * (the "Software"), to deal in the Software without restriction, including
9  * without limitation the rights to use, copy, modify, merge, publish,
10  * distribute, sublicense, and/or sell copies of the Software, and to
11  * permit persons to whom the Software is furnished to do so, subject to
12  * the following conditions:
13  *
14  * The above copyright notice and this permission notice shall be included
15  * in all copies or substantial portions of the Software.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24  */
25
26 /*
27  * OpenGL Texture based rendering backend module
28  * This module provides the gltex renderer backend.
29  */
30
31 #include <errno.h>
32 #include <stdlib.h>
33 #include "text.h"
34 #include "kmscon_module_interface.h"
35 #include "shl_log.h"
36
37 #define LOG_SUBSYSTEM "mod_gltex"
38
39 static int kmscon_gltex_load(void)
40 {
41         int ret;
42
43         kmscon_text_gltex_ops.owner = KMSCON_THIS_MODULE;
44         ret = kmscon_text_register(&kmscon_text_gltex_ops);
45         if (ret) {
46                 log_error("cannot register gltex renderer");
47                 return ret;
48         }
49
50         return 0;
51 }
52
53 static void kmscon_gltex_unload(void)
54 {
55         kmscon_text_unregister(kmscon_text_gltex_ops.name);
56 }
57
58 KMSCON_MODULE(NULL, kmscon_gltex_load, kmscon_gltex_unload, NULL);