1 /*
2  * Cogl
3  *
4  * A Low Level GPU Graphics and Utilities API
5  *
6  * Copyright (C) 2009,2010,2011,2012 Intel Corporation.
7  *
8  * Permission is hereby granted, free of charge, to any person
9  * obtaining a copy of this software and associated documentation
10  * files (the "Software"), to deal in the Software without
11  * restriction, including without limitation the rights to use, copy,
12  * modify, merge, publish, distribute, sublicense, and/or sell copies
13  * of the Software, and to permit persons to whom the Software is
14  * furnished to do so, subject to the following conditions:
15  *
16  * The above copyright notice and this permission notice shall be
17  * included in all copies or substantial portions of the Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
23  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
24  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26  * SOFTWARE.
27  *
28  *
29  *
30  * Authors:
31  *  Neil Roberts   <neil@linux.intel.com>
32  *  Robert Bragg   <robert@linux.intel.com>
33  */
34 
35 #include "cogl-config.h"
36 
37 #include <string.h>
38 
39 #include "cogl-private.h"
40 #include "cogl-texture-2d-nop-private.h"
41 #include "cogl-texture-2d-private.h"
42 
43 void
_cogl_texture_2d_nop_free(CoglTexture2D * tex_2d)44 _cogl_texture_2d_nop_free (CoglTexture2D *tex_2d)
45 {
46 }
47 
48 gboolean
_cogl_texture_2d_nop_can_create(CoglContext * ctx,int width,int height,CoglPixelFormat internal_format)49 _cogl_texture_2d_nop_can_create (CoglContext *ctx,
50                                  int width,
51                                  int height,
52                                  CoglPixelFormat internal_format)
53 {
54   return TRUE;
55 }
56 
57 void
_cogl_texture_2d_nop_init(CoglTexture2D * tex_2d)58 _cogl_texture_2d_nop_init (CoglTexture2D *tex_2d)
59 {
60 }
61 
62 gboolean
_cogl_texture_2d_nop_allocate(CoglTexture * tex,GError ** error)63 _cogl_texture_2d_nop_allocate (CoglTexture *tex,
64                                GError **error)
65 {
66   return TRUE;
67 }
68 
69 void
_cogl_texture_2d_nop_flush_legacy_texobj_filters(CoglTexture * tex,GLenum min_filter,GLenum mag_filter)70 _cogl_texture_2d_nop_flush_legacy_texobj_filters (CoglTexture *tex,
71                                                   GLenum min_filter,
72                                                   GLenum mag_filter)
73 {
74 }
75 
76 void
_cogl_texture_2d_nop_flush_legacy_texobj_wrap_modes(CoglTexture * tex,GLenum wrap_mode_s,GLenum wrap_mode_t)77 _cogl_texture_2d_nop_flush_legacy_texobj_wrap_modes (CoglTexture *tex,
78                                                      GLenum wrap_mode_s,
79                                                      GLenum wrap_mode_t)
80 {
81 }
82 
83 void
_cogl_texture_2d_nop_copy_from_framebuffer(CoglTexture2D * tex_2d,int src_x,int src_y,int width,int height,CoglFramebuffer * src_fb,int dst_x,int dst_y,int level)84 _cogl_texture_2d_nop_copy_from_framebuffer (CoglTexture2D *tex_2d,
85                                             int src_x,
86                                             int src_y,
87                                             int width,
88                                             int height,
89                                             CoglFramebuffer *src_fb,
90                                             int dst_x,
91                                             int dst_y,
92                                             int level)
93 {
94 }
95 
96 unsigned int
_cogl_texture_2d_nop_get_gl_handle(CoglTexture2D * tex_2d)97 _cogl_texture_2d_nop_get_gl_handle (CoglTexture2D *tex_2d)
98 {
99   return 0;
100 }
101 
102 void
_cogl_texture_2d_nop_generate_mipmap(CoglTexture2D * tex_2d)103 _cogl_texture_2d_nop_generate_mipmap (CoglTexture2D *tex_2d)
104 {
105 }
106 
107 gboolean
_cogl_texture_2d_nop_copy_from_bitmap(CoglTexture2D * tex_2d,int src_x,int src_y,int width,int height,CoglBitmap * bitmap,int dst_x,int dst_y,int level,GError ** error)108 _cogl_texture_2d_nop_copy_from_bitmap (CoglTexture2D *tex_2d,
109                                        int src_x,
110                                        int src_y,
111                                        int width,
112                                        int height,
113                                        CoglBitmap *bitmap,
114                                        int dst_x,
115                                        int dst_y,
116                                        int level,
117                                        GError **error)
118 {
119   return TRUE;
120 }
121 
122 void
_cogl_texture_2d_nop_get_data(CoglTexture2D * tex_2d,CoglPixelFormat format,size_t rowstride,uint8_t * data)123 _cogl_texture_2d_nop_get_data (CoglTexture2D *tex_2d,
124                                CoglPixelFormat format,
125                                size_t rowstride,
126                                uint8_t *data)
127 {
128 }
129