summaryrefslogtreecommitdiff
path: root/cogl/cogl-pixel-buffer-private.h
Commit message (Collapse)AuthorAgeFilesLines
* This re-licenses Cogl 1.18 under the MIT licenseRobert Bragg2014-02-221-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the Cogl 1.18 branch is actively maintained in parallel with the master branch; this is a counter part to commit 1b83ef938fc16b which re-licensed the master branch to use the MIT license. This re-licensing is a follow up to the proposal that was sent to the Cogl mailing list: http://lists.freedesktop.org/archives/cogl/2013-December/001465.html Note: there was a copyright assignment policy in place for Clutter (and therefore Cogl which was part of Clutter at the time) until the 11th of June 2010 and so we only checked the details after that point (commit 0bbf50f905) For each file, authors were identified via this Git command: $ git blame -p -C -C -C20 -M -M10 0bbf50f905..HEAD We received blanket approvals for re-licensing all Red Hat and Collabora contributions which reduced how many people needed to be contacted individually: - http://lists.freedesktop.org/archives/cogl/2013-December/001470.html - http://lists.freedesktop.org/archives/cogl/2014-January/001536.html Individual approval requests were sent to all the other identified authors who all confirmed the re-license on the Cogl mailinglist: http://lists.freedesktop.org/archives/cogl/2014-January As well as updating the copyright header in all sources files, the COPYING file has been updated to reflect the license change and also document the other licenses used in Cogl such as the SGI Free Software License B, version 2.0 and the 3-clause BSD license. This patch was not simply cherry-picked from master; but the same methodology was used to check the source files.
* Fixes for --disable-glibNeil Roberts2013-01-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This fixes some problems which were stopping --disable-glib from working properly: • A lot of the public headers were including glib.h. This shouldn't be necessary because the API doesn't expose any glib types. Otherwise any apps would require glib in order to get the header. • The public headers were using G_BEGIN_DECLS. There is now a replacement macro called COGL_BEGIN_DECLS which is defined in cogl-types.h. • A similar fix has been done for G_GNUC_NULL_TERMINATED and G_GNUC_DEPRECATED. • The CFLAGS were not including $(builddir)/deps/glib which was preventing it finding the generated glibconfig.h when building out of tree. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 4138b3141c2f39cddaea3d72bfc04342ed5092d0)
* Removes all remaining use of CoglHandleRobert Bragg2012-08-061-1/+1
| | | | | | | | | | | | | | | | | | | Removing CoglHandle has been an on going goal for quite a long time now and finally this patch removes the last remaining uses of the CoglHandle type and the cogl_handle_ apis. Since the big remaining users of CoglHandle were the cogl_program_ and cogl_shader_ apis which have replaced with the CoglSnippets api this patch removes both of these apis. Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit 6ed3aaf4be21d605a1ed3176b3ea825933f85cf0) Since the original patch was done after removing deprecated API this back ported patch doesn't affect deprecated API and so actually this cherry-pick doesn't remove all remaining use of CoglHandle as it did for the master branch of Cogl.
* Add the missing cast macros for some buffer objectsNeil Roberts2012-03-051-2/+0
| | | | | | | CoglPixelBuffer, CoglAttributeBuffer and CoglIndexBuffer were missing public cast macros. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* Change API so that CoglPixelBuffer no longer knows its w/h/formatNeil Roberts2012-03-051-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea is that CoglPixelBuffer should just be a buffer that can be used for pixel data and it has no idea about the details of any images that are stored in it. This is analogous to CoglAttributeBuffer which itself does not have any information about the attributes. When you want to use a pixel buffer you should create a CoglBitmap which points to a region of the attribute buffer and provides the extra needed information such as the width, height and format. That way it is also possible to use a single CoglPixelBuffer with multiple bitmaps. The changes that are made are: • cogl_pixel_buffer_new_with_size has been removed and in its place is cogl_bitmap_new_with_size. This will create a pixel buffer at the right size and rowstride for the given width/height/format and immediately create a single CoglBitmap to point into it. The old function had an out-parameter for the stride of the image but with the new API this should be queriable from the bitmap (although there is no function for this yet). • There is now a public cogl_pixel_buffer_new constructor. This takes a size in bytes and data pointer similarly to cogl_attribute_buffer_new. • cogl_texture_new_from_buffer has been removed. If you want to create a texture from a pixel buffer you should wrap it up in a bitmap first. There is already API to create a texture from a bitmap. This patch also does a bit of header juggling because cogl-context.h was including cogl-texture.h and cogl-framebuffer.h which were causing some circular dependencies when cogl-bitmap.h includes cogl-context.h. These weren't actually needed in cogl-context.h itself but a few other headers were relying on them being included so this adds the #includes where necessary. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* object: Remove the type member of CoglObjectClassNeil Roberts2012-01-271-3/+0
| | | | | | | | | | | | | Unlike in GObject the type number for a CoglObject is entirely an internal implementation detail so there is no need to make a GQuark to make it safe to export out of the library. Instead we can just directly use a fixed pointer address as the identifier for the type. This patch makes it use the address of the class struct of the identifier. This should make it faster to do type checks because it does not need to call a function every time it wants to get the type number. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* Rename CoglPixelArray to CoglPixelBufferRobert Bragg2011-05-161-0/+55
| | | | | | | | | This is part of a broader cleanup of some of the experimental Cogl API. One of the reasons for this particular rename is to switch away from using the term "Array" which implies a regular, indexable layout which isn't the case. We also want to strongly imply a relationship between CoglBuffers and CoglPixelBuffers and be consistent with the CoglAttributeBuffer and CoglIndexBuffer APIs.
* rename CoglPixelBuffer to CoglPixelArrayRobert Bragg2010-07-051-73/+0
| | | | | This renames CoglPixelBuffer to CoglPixelArray to be consistent with the new CoglVertexArray API.
* pixel-buffer: Replace CoglHandle with CoglPixelBuffer *Robert Bragg2010-07-051-2/+2
| | | | One more file converted to stop using CoglHandle re:a8c8cbee513
* Remove mentions of the FSF addressEmmanuele Bassi2010-03-011-3/+3
| | | | | | | | | | | | | | | Since using addresses that might change is something that finally the FSF acknowledge as a plausible scenario (after changing address twice), the license blurb in the source files should use the URI for getting the license in case the library did not come with it. Not that URIs cannot possibly change, but at least it's easier to set up a redirection at the same place. As a side note: this commit closes the oldes bug in Clutter's bug report tool. http://bugzilla.openedhand.com/show_bug.cgi?id=521
* cogl: improves header and coding style consistencyRobert Bragg2010-02-121-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've had complaints that our Cogl code/headers are a bit "special" so this is a first pass at tidying things up by giving them some consistency. These changes are all consistent with how new code in Cogl is being written, but the style isn't consistently applied across all code yet. There are two parts to this patch; but since each one required a large amount of effort to maintain tidy indenting it made sense to combine the changes to reduce the time spent re indenting the same lines. The first change is to use a consistent style for declaring function prototypes in headers. Cogl headers now consistently use this style for prototypes: return_type cogl_function_name (CoglType arg0, CoglType arg1); Not everyone likes this style, but it seems that most of the currently active Cogl developers agree on it. The second change is to constrain the use of redundant glib data types in Cogl. Uses of gint, guint, gfloat, glong, gulong and gchar have all been replaced with int, unsigned int, float, long, unsigned long and char respectively. When talking about pixel data; use of guchar has been replaced with guint8, otherwise unsigned char can be used. The glib types that we continue to use for portability are gboolean, gint{8,16,32,64}, guint{8,16,32,64} and gsize. The general intention is that Cogl should look palatable to the widest range of C programmers including those outside the Gnome community so - especially for the public API - we want to minimize the number of foreign looking typedefs.
* cogl-pixel-buffer: add a pixel buffer object classDamien Lespiau2010-02-081-0/+72
This subclass of CoglBuffer aims at wrapping PBOs or other system surfaces like DRM buffer objects. Two constructors are available: cogl_pixel_buffer_new() with a size when you only care about the size of the buffer (such a buffer can be used to store several texture data such as the three planes of a I420 frame). cogl_pixel_buffer_new_full() is more a 1:1 mapping between the data and an underlying surface, with the possibility of having access to a low level memory buffer that may have a stride.