mutter/cogl
Robert Bragg e3c4522a86 Adds a _cogl_util_pixel_format_from_masks API
This adds a utility function for inferring a CoglPixelFormat from a
set of channel masks, a bits-per-pixel value, a pixel-depth value and
pixel byte order.

This plan is to use this to improve how we map X visuals to Cogl pixel
formats.

This patch was based on some ideas from Damien Leone <dleone@nvidia.com>

https://bugzilla.gnome.org/show_bug.cgi?id=660188

Reviewed-by: Neil Roberts <neil@linux.intel.com>
2012-02-20 23:12:45 +00:00
..
driver moves and renames _cogl_get_format_bpp 2012-02-20 23:12:44 +00:00
gl-prototypes cogl-in-gles-core-functions.h: Remove stray ';' 2012-02-13 12:22:18 +00:00
tesselator
winsys texture-pixmap-x11.h: define __COGL_H_INSIDE__ 2012-02-20 23:12:44 +00:00
cogl1-context.h Move all types/prototypes from cogl.h -> cogl[1]-context.h 2012-02-20 23:12:44 +00:00
cogl2-clip-state.c framebuffer: Add CoglFramebuffer clip stack methods 2011-12-06 18:51:56 +00:00
cogl2-clip-state.h docs: make cogl2-clip-state.h docs consistent 2011-12-06 18:51:56 +00:00
cogl2-experimental.h 2.0: Add cogl2-experimental.h + don't pollute .pc CFLAGS 2011-09-09 15:06:31 +01:00
cogl2-path.c Move all types/prototypes from cogl.h -> cogl[1]-context.h 2012-02-20 23:12:44 +00:00
cogl2-path.h
cogl-1.0.pc.in
cogl-2.0-experimental.pc.in 2.0: Add cogl2-experimental.h + don't pollute .pc CFLAGS 2011-09-09 15:06:31 +01:00
cogl-atlas-texture-private.h object: Remove the type member of CoglObjectClass 2012-01-27 17:18:32 +00:00
cogl-atlas-texture.c Move all types/prototypes from cogl.h -> cogl[1]-context.h 2012-02-20 23:12:44 +00:00
cogl-atlas.c moves and renames _cogl_get_format_bpp 2012-02-20 23:12:44 +00:00
cogl-atlas.h
cogl-attribute-buffer-private.h
cogl-attribute-buffer.c buffer: explicitly relate buffers to a context 2012-02-09 14:28:02 +00:00
cogl-attribute-buffer.h Move all types/prototypes from cogl.h -> cogl[1]-context.h 2012-02-20 23:12:44 +00:00
cogl-attribute-private.h framebuffer: Add cogl_framebuffer draw methods 2012-02-09 13:09:15 +00:00
cogl-attribute.c framebuffer: Add cogl_framebuffer draw methods 2012-02-09 13:09:15 +00:00
cogl-attribute.h Move all types/prototypes from cogl.h -> cogl[1]-context.h 2012-02-20 23:12:44 +00:00
cogl-bitmap-fallback.c Remove COGL_UNORDERED_MASK define 2012-02-20 23:12:44 +00:00
cogl-bitmap-pixbuf.c Start to reduce dependence on glib 2011-11-01 12:03:02 +00:00
cogl-bitmap-private.h Remove COGL_UNORDERED_MASK define 2012-02-20 23:12:44 +00:00
cogl-bitmap.c Remove COGL_UNPREMULT_MASK define 2012-02-20 23:12:44 +00:00
cogl-bitmap.h Start removing _EXP defines and improves some docs 2012-01-05 21:00:17 +00:00
cogl-bitmask.c cogl-bitmask: Add _cogl_bitmask_popcount 2011-11-16 16:32:11 +00:00
cogl-bitmask.h cogl-bitmask.h: Eliminate compiler warning 2011-12-07 12:08:15 +00:00
cogl-blend-string.c blend-strings: Make braces around blend factor optional 2011-09-05 17:54:46 +01:00
cogl-blend-string.h
cogl-blit.c moves and renames _cogl_get_format_bpp 2012-02-20 23:12:44 +00:00
cogl-blit.h
cogl-boxed-value.c cogl-boxed-value: Add _cogl_boxed_value_copy 2011-11-16 16:32:11 +00:00
cogl-boxed-value.h cogl-boxed-value: Add _cogl_boxed_value_copy 2011-11-16 16:32:11 +00:00
cogl-buffer-private.h buffer: explicitly relate buffers to a context 2012-02-09 14:28:02 +00:00
cogl-buffer.c buffer: explicitly relate buffers to a context 2012-02-09 14:28:02 +00:00
cogl-buffer.h Fix some doc issues 2012-02-14 20:42:10 +00:00
cogl-clip-stack.c Move all types/prototypes from cogl.h -> cogl[1]-context.h 2012-02-20 23:12:44 +00:00
cogl-clip-stack.h remove redundant _cogl_clip_stack_dirty() api 2011-12-06 18:51:57 +00:00
cogl-clip-state-private.h clip-state: remove redundant _cogl_clip_state_flush() api 2011-12-06 18:51:57 +00:00
cogl-clip-state.c clip-state: remove redundant _cogl_clip_state_flush() api 2011-12-06 18:51:57 +00:00
cogl-clip-state.h
cogl-clutter-xlib.h Remove inclusion of Xlib headers in Cogl headers 2011-11-01 15:55:53 +00:00
cogl-clutter.c Remove inclusion of Xlib headers in Cogl headers 2011-11-01 15:55:53 +00:00
cogl-clutter.h Remove inclusion of Xlib headers in Cogl headers 2011-11-01 15:55:53 +00:00
cogl-color-private.h
cogl-color.c Start to reduce dependence on glib 2011-11-01 12:03:02 +00:00
cogl-color.h
cogl-config-private.h cogl: Add support for reading a cogl.conf config file 2011-08-12 15:28:42 +01:00
cogl-config.c cogl: Add support for reading a cogl.conf config file 2011-08-12 15:28:42 +01:00
cogl-context-private.h cogl-pipeline-layer: Use CoglTextureType instead of GL target enum 2012-02-13 17:09:34 +00:00
cogl-context.c Move all types/prototypes from cogl.h -> cogl[1]-context.h 2012-02-20 23:12:44 +00:00
cogl-context.h Move all types/prototypes from cogl.h -> cogl[1]-context.h 2012-02-20 23:12:44 +00:00
cogl-debug-options.h Mark the debug options for translation 2011-10-14 13:56:51 +01:00
cogl-debug.c debug: Adds COGL_DEBUG=winsys option 2012-02-09 13:10:14 +00:00
cogl-debug.h cogl-debug: Mark _cogl_debug_flags with dllexport for MSVC 2011-11-25 13:14:10 +00:00
cogl-defines.h.in
cogl-defines.h.win32 Win32: Update predefined cogl-defines.h's 2012-02-13 12:22:17 +00:00
cogl-defines.h.win32_SDL Win32: Update predefined cogl-defines.h's 2012-02-13 12:22:17 +00:00
cogl-deprecated.h
cogl-depth-state-private.h Adds missing cogl-depth-state-private.h 2011-05-16 18:45:51 +01:00
cogl-depth-state.c Start to reduce dependence on glib 2011-11-01 12:03:02 +00:00
cogl-depth-state.h features: Support more than 32 features! 2011-11-01 12:03:01 +00:00
cogl-display-private.h egl-gdl: struct gdl_plane never was a valid type 2011-07-29 11:50:15 +01:00
cogl-display.c Start to reduce dependence on glib 2011-11-01 12:03:02 +00:00
cogl-display.h display: Remove _EXP symbol mangling and add gtk-doc 2012-02-09 13:09:15 +00:00
cogl-enum-types.c.in
cogl-enum-types.h.in
cogl-euler.c Move all types/prototypes from cogl.h -> cogl[1]-context.h 2012-02-20 23:12:44 +00:00
cogl-euler.h
cogl-feature-private.c gl-prototypes: split up cogl-ext-functions.h 2012-01-04 19:27:20 +00:00
cogl-feature-private.h Don't use the 'NULL' GModule to resolve GL symbols 2011-07-27 16:10:02 +01:00
cogl-fixed.c build: Fix building clutter on armv4t devices 2012-01-05 20:13:41 +00:00
cogl-fixed.h
cogl-flags.h cogl-flags: Fix iterating flag when the most-significant bit is set 2011-11-22 16:07:21 +00:00
cogl-framebuffer-private.h framebuffer: Add cogl_framebuffer draw methods 2012-02-09 13:09:15 +00:00
cogl-framebuffer.c Move all types/prototypes from cogl.h -> cogl[1]-context.h 2012-02-20 23:12:44 +00:00
cogl-framebuffer.h Move all types/prototypes from cogl.h -> cogl[1]-context.h 2012-02-20 23:12:44 +00:00
cogl-glib-source.c Add a utility to make a GSource out of a CoglContext 2012-01-05 13:40:59 +00:00
cogl-glib-source.h Add a utility to make a GSource out of a CoglContext 2012-01-05 13:40:59 +00:00
cogl-glx-display-private.h glx: Only call swap_buffer callbacks @ dispatch time 2012-02-08 18:58:06 +00:00
cogl-glx-renderer-private.h cogl-xlib-renderer: Move private data to cogl_object_set_user_data 2011-12-12 16:13:57 +00:00
cogl-gtype-private.h
cogl-handle.h
cogl-index-buffer-private.h
cogl-index-buffer.c buffer: explicitly relate buffers to a context 2012-02-09 14:28:02 +00:00
cogl-index-buffer.h buffer: explicitly relate buffers to a context 2012-02-09 14:28:02 +00:00
cogl-indices-private.h
cogl-indices.c buffer: explicitly relate buffers to a context 2012-02-09 14:28:02 +00:00
cogl-indices.h Move all types/prototypes from cogl.h -> cogl[1]-context.h 2012-02-20 23:12:44 +00:00
cogl-internal.h moves and renames _cogl_get_format_bpp 2012-02-20 23:12:44 +00:00
cogl-journal-private.h framebuffer: Flush the journal on destruction 2012-01-27 17:23:03 +00:00
cogl-journal.c Move all types/prototypes from cogl.h -> cogl[1]-context.h 2012-02-20 23:12:44 +00:00
cogl-kms-renderer.h kms: Adds api to get at the kms file descriptor 2012-02-08 17:00:25 +00:00
cogl-material-compat.c
cogl-material-compat.h Fix some doc issues 2012-02-14 20:42:10 +00:00
cogl-matrix-private.h
cogl-matrix-stack.c Flush matrices in the progend and flip with a vector 2011-12-06 19:02:06 +00:00
cogl-matrix-stack.h Flush matrices in the progend and flip with a vector 2011-12-06 19:02:06 +00:00
cogl-matrix.c Remove CoglVector3 type and use float * instead 2012-01-16 18:27:19 +00:00
cogl-matrix.h Fix some doc issues 2012-02-14 20:42:10 +00:00
cogl-meta-texture.c meta-texture: Support CLAMP_TO_EDGE 2011-11-01 12:03:03 +00:00
cogl-meta-texture.h Fix some doc issues 2012-02-14 20:42:10 +00:00
cogl-node-private.h pipeline: Split more code out from cogl-pipeline.c 2011-09-21 17:03:10 +01:00
cogl-node.c Start to reduce dependence on glib 2011-11-01 12:03:02 +00:00
cogl-object-private.h object: Add a virtual pointer for the unref function 2012-01-27 17:22:57 +00:00
cogl-object.c object: Add a virtual pointer for the unref function 2012-01-27 17:22:57 +00:00
cogl-object.h
cogl-offscreen.h Add a strong CoglTexture type to replace CoglHandle 2011-09-21 15:27:03 +01:00
cogl-onscreen-private.h Fix build on OSX 2012-02-15 14:57:59 +00:00
cogl-onscreen-template-private.h framebuffer: split out CoglOnscreen code 2011-11-01 12:03:02 +00:00
cogl-onscreen-template.c template: Allow configuration of swap throttle 2012-01-16 18:27:20 +00:00
cogl-onscreen-template.h template: Allow configuration of swap throttle 2012-01-16 18:27:20 +00:00
cogl-onscreen.c Move all types/prototypes from cogl.h -> cogl[1]-context.h 2012-02-20 23:12:44 +00:00
cogl-onscreen.h wayland: perform buffer resizes lazily at swap buffers 2012-01-16 18:27:20 +00:00
cogl-pango.h
cogl-path-private.h clip-stack: Move path flushing code to cogl-clip-stack.c 2011-11-01 12:02:59 +00:00
cogl-path.c Start to reduce dependence on glib 2011-11-01 12:03:02 +00:00
cogl-path.h
cogl-pipeline-cache.c cogl-pipeline: Add two hook points for adding shader snippets 2011-12-06 19:02:05 +00:00
cogl-pipeline-cache.h cogl-pipeline: Use the pipeline cache for the GLSL backends 2011-07-13 12:30:07 +01:00
cogl-pipeline-debug.c pipeline: Split more code out from cogl-pipeline.c 2011-09-21 17:03:10 +01:00
cogl-pipeline-fragend-arbfp-private.h fragend-arbfp: Move the pipeline cache to a separate file 2011-07-13 12:30:07 +01:00
cogl-pipeline-fragend-arbfp.c pipeline: Use layer numbers not unit numbers in the combine strings 2012-02-13 17:15:35 +00:00
cogl-pipeline-fragend-fixed-private.h
cogl-pipeline-fragend-fixed.c pipeline: Use layer numbers not unit numbers in the combine strings 2012-02-13 17:15:35 +00:00
cogl-pipeline-fragend-glsl-private.h
cogl-pipeline-fragend-glsl.c Pass the sampler object to snippet hooks on the texture_hookup 2012-02-13 17:29:28 +00:00
cogl-pipeline-layer-private.h pipeline: Use layer numbers not unit numbers in the combine strings 2012-02-13 17:15:35 +00:00
cogl-pipeline-layer-state-private.h cogl-pipeline-layer: Use CoglTextureType instead of GL target enum 2012-02-13 17:09:34 +00:00
cogl-pipeline-layer-state.c Add cogl_pipeline_set_layer_null_texture() 2012-02-13 17:15:08 +00:00
cogl-pipeline-layer-state.h Add cogl_pipeline_set_layer_null_texture() 2012-02-13 17:15:08 +00:00
cogl-pipeline-layer.c cogl-pipeline-layer: Use CoglTextureType instead of GL target enum 2012-02-13 17:09:34 +00:00
cogl-pipeline-opengl-private.h
cogl-pipeline-opengl.c cogl-pipeline-layer: Use CoglTextureType instead of GL target enum 2012-02-13 17:09:34 +00:00
cogl-pipeline-private.h Add a version of _cogl_pipeline_get_layer which does not create it 2012-02-13 17:15:35 +00:00
cogl-pipeline-progend-fixed-private.h Flush matrices in the progend and flip with a vector 2011-12-06 19:02:06 +00:00
cogl-pipeline-progend-fixed.c Flush matrices in the progend and flip with a vector 2011-12-06 19:02:06 +00:00
cogl-pipeline-progend-glsl-private.h rework enabling of attributes, removing _cogl_enable() 2011-12-06 18:51:57 +00:00
cogl-pipeline-progend-glsl.c glsl: always emit sampler uniforms for non NULL layers 2012-02-13 17:29:20 +00:00
cogl-pipeline-snippet-private.h snippet: Add a hook for the layer texture coordinate transformation 2011-12-06 19:02:06 +00:00
cogl-pipeline-snippet.c snippet: Add a hook for the layer texture coordinate transformation 2011-12-06 19:02:06 +00:00
cogl-pipeline-state-private.h pipeline: Assume blend enabled when there are snippets 2011-12-06 19:02:06 +00:00
cogl-pipeline-state.c pipeline-state: Fix crash in the get_all_uniform_values function 2012-02-13 18:48:17 +00:00
cogl-pipeline-state.h renderer: Remove _EXP symbol mangling and add gtk-doc 2012-01-16 18:27:20 +00:00
cogl-pipeline-vertend-fixed-private.h
cogl-pipeline-vertend-fixed.c Flush matrices in the progend and flip with a vector 2011-12-06 19:02:06 +00:00
cogl-pipeline-vertend-glsl-private.h
cogl-pipeline-vertend-glsl.c Flush matrices in the progend and flip with a vector 2011-12-06 19:02:06 +00:00
cogl-pipeline.c Move all types/prototypes from cogl.h -> cogl[1]-context.h 2012-02-20 23:12:44 +00:00
cogl-pipeline.h renderer: Remove _EXP symbol mangling and add gtk-doc 2012-01-16 18:27:20 +00:00
cogl-pixel-buffer-private.h object: Remove the type member of CoglObjectClass 2012-01-27 17:18:32 +00:00
cogl-pixel-buffer.c moves and renames _cogl_get_format_bpp 2012-02-20 23:12:44 +00:00
cogl-pixel-buffer.h buffer: explicitly relate buffers to a context 2012-02-09 14:28:02 +00:00
cogl-point-in-poly-private.h
cogl-point-in-poly.c
cogl-poll.c Add support for main loop integration 2012-01-05 13:40:10 +00:00
cogl-poll.h cogl-poll: Add a missing G_END_DECLS to the header 2012-01-24 14:04:26 +00:00
cogl-primitive-private.h primitive: Adds _cogl_primitive_draw api taking flags 2011-11-01 12:02:59 +00:00
cogl-primitive.c buffer: explicitly relate buffers to a context 2012-02-09 14:28:02 +00:00
cogl-primitive.h Move all types/prototypes from cogl.h -> cogl[1]-context.h 2012-02-20 23:12:44 +00:00
cogl-primitives-private.h framebuffer: Add cogl_framebuffer draw methods 2012-02-09 13:09:15 +00:00
cogl-primitives.c Move all types/prototypes from cogl.h -> cogl[1]-context.h 2012-02-20 23:12:44 +00:00
cogl-primitives.h
cogl-private.h Adds _cogl_pixel_format_is_endian_dependant api 2012-02-20 23:12:44 +00:00
cogl-profile.c profile: use atexit not g_atexit 2012-01-16 23:27:36 +00:00
cogl-profile.h
cogl-program-private.h
cogl-program.c cogl-program: Move the code for CoglBoxedValue to its own file 2011-11-16 16:32:10 +00:00
cogl-quaternion-private.h
cogl-quaternion.c Move all types/prototypes from cogl.h -> cogl[1]-context.h 2012-02-20 23:12:44 +00:00
cogl-quaternion.h Fix some doc issues 2012-02-14 20:42:10 +00:00
cogl-queue.h
cogl-rectangle-map.c Start to reduce dependence on glib 2011-11-01 12:03:02 +00:00
cogl-rectangle-map.h
cogl-renderer-private.h renderer: Adds api to add/remove selection constraints 2012-01-16 18:27:19 +00:00
cogl-renderer.c renderer: fix s/contraint/constraint/ typo 2012-02-08 17:00:25 +00:00
cogl-renderer.h renderer: fix s/contraint/constraint/ typo 2012-02-08 17:00:25 +00:00
cogl-shader-boilerplate.h Dynamically load the GL or GLES library 2011-07-11 12:57:38 +01:00
cogl-shader-private.h Dynamically load the GL or GLES library 2011-07-11 12:57:38 +01:00
cogl-shader.c Use the same number for n_tex_coord_attribs in all linked shaders 2011-11-02 13:50:28 +00:00
cogl-shader.h snippet: Add some more documentation 2011-12-07 14:52:48 +00:00
cogl-snippet-private.h snippet: Move the hook to be a property of the snippet 2011-12-06 19:02:06 +00:00
cogl-snippet.c snippet: Move the hook to be a property of the snippet 2011-12-06 19:02:06 +00:00
cogl-snippet.h Pass the sampler object to snippet hooks on the texture_hookup 2012-02-13 17:29:28 +00:00
cogl-spans.c spans: avoid normalize with normalize_factor of 1 2011-11-01 12:03:03 +00:00
cogl-spans.h Adds support for a mirrored repeat wrap mode 2011-11-01 12:03:02 +00:00
cogl-sub-texture-private.h object: Remove the type member of CoglObjectClass 2012-01-27 17:18:32 +00:00
cogl-sub-texture.c Add _cogl_texture_get_type() 2012-02-13 17:02:46 +00:00
cogl-sub-texture.h sub-texture: Exposes a getter for parent texture 2012-01-05 20:57:52 +00:00
cogl-swap-chain-private.h
cogl-swap-chain.c
cogl-swap-chain.h EGL: Updates GDL platform support 2011-05-05 14:46:02 +01:00
cogl-texture-2d-private.h object: Remove the type member of CoglObjectClass 2012-01-27 17:18:32 +00:00
cogl-texture-2d-sliced-private.h object: Remove the type member of CoglObjectClass 2012-01-27 17:18:32 +00:00
cogl-texture-2d-sliced.c moves and renames _cogl_get_format_bpp 2012-02-20 23:12:44 +00:00
cogl-texture-2d-sliced.h Start removing _EXP defines and improves some docs 2012-01-05 21:00:17 +00:00
cogl-texture-2d.c moves and renames _cogl_get_format_bpp 2012-02-20 23:12:44 +00:00
cogl-texture-2d.h features: Support more than 32 features! 2011-11-01 12:03:01 +00:00
cogl-texture-3d-private.h object: Remove the type member of CoglObjectClass 2012-01-27 17:18:32 +00:00
cogl-texture-3d.c moves and renames _cogl_get_format_bpp 2012-02-20 23:12:44 +00:00
cogl-texture-3d.h
cogl-texture-driver.h Move the cogl texture driver functions to a vtable 2011-07-08 15:35:51 +01:00
cogl-texture-private.h Add _cogl_texture_get_type() 2012-02-13 17:02:46 +00:00
cogl-texture-rectangle-private.h object: Remove the type member of CoglObjectClass 2012-01-27 17:18:32 +00:00
cogl-texture-rectangle.c moves and renames _cogl_get_format_bpp 2012-02-20 23:12:44 +00:00
cogl-texture-rectangle.h texture: Make CoglTextureRectangle experimentally public 2011-11-01 12:03:02 +00:00
cogl-texture.c moves and renames _cogl_get_format_bpp 2012-02-20 23:12:44 +00:00
cogl-texture.h Move all types/prototypes from cogl.h -> cogl[1]-context.h 2012-02-20 23:12:44 +00:00
cogl-types.h pixel formats: Documents the internal representation 2012-02-20 23:12:45 +00:00
cogl-util.c Adds a _cogl_util_pixel_format_from_masks API 2012-02-20 23:12:45 +00:00
cogl-util.h Adds a _cogl_util_pixel_format_from_masks API 2012-02-20 23:12:45 +00:00
cogl-vector.c Move all types/prototypes from cogl.h -> cogl[1]-context.h 2012-02-20 23:12:44 +00:00
cogl-vector.h Remove CoglVector3 type and use float * instead 2012-01-16 18:27:19 +00:00
cogl-vertex-buffer-private.h
cogl-vertex-buffer.c Move all types/prototypes from cogl.h -> cogl[1]-context.h 2012-02-20 23:12:44 +00:00
cogl-vertex-buffer.h
cogl-wayland-renderer.h wayland: Add api to set a foreign shell 2011-12-07 15:53:05 +00:00
cogl-win32-renderer.c replace public native_event APIs with typesafe APIs 2011-06-30 14:33:13 +01:00
cogl-win32-renderer.h
cogl-x11-renderer-private.h work towards consistent platform file/symbol naming 2011-06-30 14:34:33 +01:00
cogl-xlib-private.h
cogl-xlib-renderer-private.h xlib: Internally retrieve XEvents 2012-01-05 13:40:24 +00:00
cogl-xlib-renderer.c xlib: Internally retrieve XEvents 2012-01-05 13:40:24 +00:00
cogl-xlib-renderer.h xlib: Internally retrieve XEvents 2012-01-05 13:40:24 +00:00
cogl-xlib.c cogl-xlib-renderer: Move private data to cogl_object_set_user_data 2011-12-12 16:13:57 +00:00
cogl-xlib.h Remove inclusion of Xlib headers in Cogl headers 2011-11-01 15:55:53 +00:00
cogl.c Add 30-bit color depth pixel formats X101010 and 2101010 2012-02-20 23:12:45 +00:00
cogl.h Move all types/prototypes from cogl.h -> cogl[1]-context.h 2012-02-20 23:12:44 +00:00
cogl.rc.in Add Windows Resource Files templates 2011-12-15 20:31:30 +08:00
cogl.symbols Update cogl.symbols 2012-02-15 22:50:09 +08:00
Makefile.am Move all types/prototypes from cogl.h -> cogl[1]-context.h 2012-02-20 23:12:44 +00:00
stb_image.c stb_image: use glib sized types 2011-08-12 15:28:42 +01:00