~noskcaj/ubuntu/trusty/cogl/1.16.2

« back to all changes in this revision

Viewing changes to cogl/driver/nop/cogl-texture-2d-nop.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha, Jeremy Bicha, Rico Tzschichholz
  • Date: 2013-02-26 16:43:25 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20130226164325-t4z9rylpa20v0p6q
Tags: 1.13.4-0ubuntu1
[ Jeremy Bicha ]
* New upstream release
  - soname bump
* debian/control.in:
  - Bump minimum glib to 2.32
  - Drop obsolete breaks/replaces
  - Bump libclutter-1.0-dev breaks for soname transition
* debian/libcogl-dev.install:
  - Add some missing files

[ Rico Tzschichholz ]
* debian/control.in:
  - Build-depend on libxrandr-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Cogl
 
3
 *
 
4
 * An object oriented GL/GLES Abstraction/Utility Layer
 
5
 *
 
6
 * Copyright (C) 2009,2010,2011,2012 Intel Corporation.
 
7
 *
 
8
 * This library is free software; you can redistribute it and/or
 
9
 * modify it under the terms of the GNU Lesser General Public
 
10
 * License as published by the Free Software Foundation; either
 
11
 * version 2 of the License, or (at your option) any later version.
 
12
 *
 
13
 * This library is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
16
 * Lesser General Public License for more details.
 
17
 *
 
18
 * You should have received a copy of the GNU Lesser General Public
 
19
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 
20
 *
 
21
 *
 
22
 *
 
23
 * Authors:
 
24
 *  Neil Roberts   <neil@linux.intel.com>
 
25
 *  Robert Bragg   <robert@linux.intel.com>
 
26
 */
 
27
 
 
28
#ifdef HAVE_CONFIG_H
 
29
#include "config.h"
 
30
#endif
 
31
 
 
32
#include <string.h>
 
33
 
 
34
#include "cogl-private.h"
 
35
#include "cogl-texture-2d-nop-private.h"
 
36
#include "cogl-texture-2d-private.h"
 
37
#include "cogl-error-private.h"
 
38
 
 
39
void
 
40
_cogl_texture_2d_nop_free (CoglTexture2D *tex_2d)
 
41
{
 
42
}
 
43
 
 
44
CoglBool
 
45
_cogl_texture_2d_nop_can_create (CoglContext *ctx,
 
46
                                 int width,
 
47
                                 int height,
 
48
                                 CoglPixelFormat internal_format)
 
49
{
 
50
  return TRUE;
 
51
}
 
52
 
 
53
void
 
54
_cogl_texture_2d_nop_init (CoglTexture2D *tex_2d)
 
55
{
 
56
}
 
57
 
 
58
CoglBool
 
59
_cogl_texture_2d_nop_allocate (CoglTexture *tex,
 
60
                               CoglError **error)
 
61
{
 
62
  return TRUE;
 
63
}
 
64
 
 
65
CoglTexture2D *
 
66
_cogl_texture_2d_nop_new_from_bitmap (CoglBitmap *bmp,
 
67
                                      CoglPixelFormat internal_format,
 
68
                                      CoglError **error)
 
69
{
 
70
  return _cogl_texture_2d_create_base (_cogl_bitmap_get_context (bmp),
 
71
                                       cogl_bitmap_get_width (bmp),
 
72
                                       cogl_bitmap_get_height (bmp),
 
73
                                       internal_format);
 
74
}
 
75
 
 
76
#if defined (COGL_HAS_EGL_SUPPORT) && defined (EGL_KHR_image_base)
 
77
CoglTexture2D *
 
78
_cogl_egl_texture_2d_nop_new_from_image (CoglContext *ctx,
 
79
                                         int width,
 
80
                                         int height,
 
81
                                         CoglPixelFormat format,
 
82
                                         EGLImageKHR image,
 
83
                                         CoglError **error)
 
84
{
 
85
  _cogl_set_error (error,
 
86
                   COGL_SYSTEM_ERROR,
 
87
                   COGL_SYSTEM_ERROR_UNSUPPORTED,
 
88
                   "Creating 2D textures from an EGLImage isn't "
 
89
                   "supported by the NOP backend");
 
90
  return NULL;
 
91
}
 
92
#endif
 
93
 
 
94
void
 
95
_cogl_texture_2d_nop_flush_legacy_texobj_filters (CoglTexture *tex,
 
96
                                                  GLenum min_filter,
 
97
                                                  GLenum mag_filter)
 
98
{
 
99
}
 
100
 
 
101
void
 
102
_cogl_texture_2d_nop_flush_legacy_texobj_wrap_modes (CoglTexture *tex,
 
103
                                                     GLenum wrap_mode_s,
 
104
                                                     GLenum wrap_mode_t,
 
105
                                                     GLenum wrap_mode_p)
 
106
{
 
107
}
 
108
 
 
109
void
 
110
_cogl_texture_2d_nop_copy_from_framebuffer (CoglTexture2D *tex_2d,
 
111
                                            int src_x,
 
112
                                            int src_y,
 
113
                                            int width,
 
114
                                            int height,
 
115
                                            CoglFramebuffer *src_fb,
 
116
                                            int dst_x,
 
117
                                            int dst_y,
 
118
                                            int level)
 
119
{
 
120
}
 
121
 
 
122
unsigned int
 
123
_cogl_texture_2d_nop_get_gl_handle (CoglTexture2D *tex_2d)
 
124
{
 
125
  return 0;
 
126
}
 
127
 
 
128
void
 
129
_cogl_texture_2d_nop_generate_mipmap (CoglTexture2D *tex_2d)
 
130
{
 
131
}
 
132
 
 
133
CoglBool
 
134
_cogl_texture_2d_nop_copy_from_bitmap (CoglTexture2D *tex_2d,
 
135
                                       int src_x,
 
136
                                       int src_y,
 
137
                                       int width,
 
138
                                       int height,
 
139
                                       CoglBitmap *bitmap,
 
140
                                       int dst_x,
 
141
                                       int dst_y,
 
142
                                       int level,
 
143
                                       CoglError **error)
 
144
{
 
145
  return TRUE;
 
146
}
 
147
 
 
148
void
 
149
_cogl_texture_2d_nop_get_data (CoglTexture2D *tex_2d,
 
150
                               CoglPixelFormat format,
 
151
                               size_t rowstride,
 
152
                               uint8_t *data)
 
153
{
 
154
}