mutter/cogl
Robert Bragg 73e8a6d7ce Allow lazy texture storage allocation
Consistent with how we lazily allocate framebuffers this patch allows us
to instantiate textures but still specify constraints and requirements
before allocating storage so that we can be sure to allocate the most
appropriate/efficient storage.

This adds a cogl_texture_allocate() function that is analogous to
cogl_framebuffer_allocate() which can optionally be called to explicitly
allocate storage and catch any errors. If this function isn't used
explicitly then Cogl will implicitly ensure textures are allocated
before the storage is needed.

It is generally recommended to rely on lazy storage allocation or at
least perform explicit allocation as late as possible so Cogl can be
fully informed about the best way to allocate storage.

Reviewed-by: Neil Roberts <neil@linux.intel.com>

(cherry picked from commit 1fa7c0f10a8a03043e3c75cb079a49625df098b7)

Note: This reverts the cogl_texture_rectangle_new_with_size API change
that dropped the CoglError argument and keeps the semantics of
allocating the texture immediately. This is because Mutter currently
uses this API so we will probably look at updating this later once
we have a corresponding Mutter patch prepared. The other API changes
were kept since they only affected experimental api.
2013-01-22 17:48:17 +00:00
..
driver Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
gl-prototypes
tesselator
winsys Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl1-context.h
cogl2-compatibility.c
cogl2-compatibility.h
cogl2-experimental.h
cogl2-path.c
cogl2-path.h Fixes for --disable-glib 2013-01-22 17:48:05 +00:00
cogl-1.0.pc.in
cogl-2.0-experimental.pc.in
cogl-atlas-texture-private.h Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-atlas-texture.c Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-atlas.c Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-atlas.h texture: split out high-level texture constructors 2013-01-22 17:48:07 +00:00
cogl-attribute-buffer-private.h
cogl-attribute-buffer.c Allow propogation of OOM errors to apps 2013-01-22 17:48:07 +00:00
cogl-attribute-buffer.h
cogl-attribute-private.h
cogl-attribute.c
cogl-attribute.h
cogl-auto-texture.c Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-bitmap-conversion.c
cogl-bitmap-packing.h
cogl-bitmap-pixbuf.c
cogl-bitmap-private.h
cogl-bitmap.c
cogl-bitmap.h
cogl-bitmask.c
cogl-bitmask.h
cogl-blend-string.c
cogl-blend-string.h
cogl-blit.c Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-blit.h
cogl-boxed-value.c
cogl-boxed-value.h
cogl-buffer-private.h
cogl-buffer.c
cogl-buffer.h
cogl-clip-stack.c
cogl-clip-stack.h Re-design the matrix stack using a graph of ops 2012-08-06 14:27:40 +01:00
cogl-clip-state-private.h
cogl-clip-state.c
cogl-clip-state.h
cogl-clutter-xlib.h
cogl-clutter.c Add a GL 3 driver 2013-01-22 17:48:01 +00:00
cogl-clutter.h
cogl-color-private.h
cogl-color.c
cogl-color.h
cogl-config-private.h
cogl-config.c
cogl-context-private.h
cogl-context.c
cogl-context.h
cogl-debug-options.h
cogl-debug.c
cogl-debug.h
cogl-defines.h.in
cogl-defines.h.win32_SDL.in
cogl-defines.h.win32.in
cogl-deprecated.h
cogl-depth-state-private.h
cogl-depth-state.c
cogl-depth-state.h
cogl-display-private.h
cogl-display.c
cogl-display.h
cogl-driver.h Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-egl-defines.h.in
cogl-egl.h
cogl-enum-types.c.in
cogl-enum-types.h.in
cogl-error-private.h
cogl-error.c
cogl-error.h
cogl-euler.c
cogl-euler.h
cogl-feature-private.c
cogl-feature-private.h
cogl-fixed.c
cogl-fixed.h
cogl-flags.h
cogl-framebuffer-private.h Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-framebuffer.c Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-framebuffer.h
cogl-gl-header.h.in
cogl-gl-header.h.win32
cogl-gles2-context-private.h
cogl-gles2-context.c
cogl-gles2-types.h
cogl-gles2.h
cogl-glib-source.c
cogl-glib-source.h
cogl-glsl-shader-boilerplate.h
cogl-glsl-shader-private.h
cogl-glsl-shader.c
cogl-glx-display-private.h
cogl-glx-renderer-private.h
cogl-gpu-info-private.h
cogl-gpu-info.c
cogl-gtype-private.h
cogl-index-buffer-private.h
cogl-index-buffer.c
cogl-index-buffer.h
cogl-indices-private.h
cogl-indices.c
cogl-indices.h
cogl-journal-private.h
cogl-journal.c
cogl-kms-display.h
cogl-kms-renderer.h
cogl-magazine-private.h
cogl-magazine.c
cogl-material-compat.c
cogl-material-compat.h
cogl-matrix-private.h
cogl-matrix-stack-private.h
cogl-matrix-stack.c
cogl-matrix-stack.h
cogl-matrix.c
cogl-matrix.h
cogl-memory-stack-private.h
cogl-memory-stack.c
cogl-meta-texture.c
cogl-meta-texture.h
cogl-node-private.h
cogl-node.c
cogl-object-private.h
cogl-object.c
cogl-object.h doc: Put the opening '{' at the end of combined typedefs 2013-01-22 17:48:15 +00:00
cogl-offscreen.h
cogl-onscreen-private.h
cogl-onscreen-template-private.h
cogl-onscreen-template.c
cogl-onscreen-template.h
cogl-onscreen.c
cogl-onscreen.h
cogl-pango.h
cogl-path-functions.h
cogl-path-private.h
cogl-path.c
cogl-path.h
cogl-pipeline-cache.c build: Hide cogl_pipeline_cache_{new,free}() 2013-01-22 17:48:16 +00:00
cogl-pipeline-cache.h
cogl-pipeline-debug.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
cogl-pipeline-layer-private.h
cogl-pipeline-layer-state-private.h
cogl-pipeline-layer-state.c
cogl-pipeline-layer-state.h
cogl-pipeline-layer.c
cogl-pipeline-private.h
cogl-pipeline-snippet-private.h
cogl-pipeline-snippet.c
cogl-pipeline-state-private.h
cogl-pipeline-state.c
cogl-pipeline-state.h
cogl-pipeline.c
cogl-pipeline.h
cogl-pixel-buffer-private.h
cogl-pixel-buffer.c
cogl-pixel-buffer.h
cogl-point-in-poly-private.h
cogl-point-in-poly.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
cogl-poll.c
cogl-poll.h
cogl-primitive-private.h
cogl-primitive-texture.c
cogl-primitive-texture.h
cogl-primitive.c
cogl-primitive.h
cogl-primitives-private.h
cogl-primitives.c
cogl-primitives.h
cogl-private.h
cogl-profile.c
cogl-profile.h
cogl-program-private.h
cogl-program.c Remove cogl-internal.h 2013-01-22 17:48:17 +00:00
cogl-quaternion-private.h
cogl-quaternion.c doc: Fix various mismatches between arguments and their documentation 2013-01-22 17:48:13 +00:00
cogl-quaternion.h
cogl-queue.h
cogl-rectangle-map.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
cogl-rectangle-map.h
cogl-renderer-private.h
cogl-renderer.c
cogl-renderer.h
cogl-sampler-cache-private.h
cogl-sampler-cache.c
cogl-sdl.c
cogl-sdl.h
cogl-shader-private.h
cogl-shader.c Remove cogl-internal.h 2013-01-22 17:48:17 +00:00
cogl-shader.h
cogl-snippet-private.h
cogl-snippet.c
cogl-snippet.h
cogl-spans.c
cogl-spans.h
cogl-sub-texture-private.h
cogl-sub-texture.c Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-sub-texture.h
cogl-swap-chain-private.h
cogl-swap-chain.c
cogl-swap-chain.h
cogl-texture-2d-gl.h
cogl-texture-2d-private.h Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-texture-2d-sliced-private.h Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-texture-2d-sliced.c Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-texture-2d-sliced.h Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-texture-2d.c Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-texture-2d.h Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-texture-3d-private.h Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-texture-3d.c Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-texture-3d.h Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-texture-driver.h
cogl-texture-private.h Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-texture-rectangle-private.h Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-texture-rectangle.c Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-texture-rectangle.h
cogl-texture.c Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-texture.h Allow lazy texture storage allocation 2013-01-22 17:48:17 +00:00
cogl-types.h
cogl-util.c
cogl-util.h
cogl-vector.c
cogl-vector.h
cogl-version.h
cogl-vertex-buffer-private.h
cogl-vertex-buffer.c
cogl-vertex-buffer.h
cogl-wayland-client.h
cogl-wayland-renderer.h
cogl-wayland-server.h
cogl-win32-renderer.c
cogl-win32-renderer.h
cogl-x11-renderer-private.h
cogl-xlib-private.h
cogl-xlib-renderer-private.h
cogl-xlib-renderer.c
cogl-xlib-renderer.h
cogl-xlib.c
cogl-xlib.h
cogl.c
cogl.h
cogl.rc.in
cogl.symbols
Makefile.am
stb_image.c