Robert Bragg
cbd6951134
introduce texture loaders to make allocations lazy
...
This introduces the internal idea of texture loaders that track the
state for loading and allocating a texture. This defers a lot more work
until the texture is allocated.
There are several intentions to this change:
- provides a means for extending how textures are allocated without
requiring all the parameters to be supplied in a single _texture_new()
function call.
- allow us to remove the internal_format argument from all
_texture_new() apis since using CoglPixelFormat is bad way of
expressing the internal format constraints because it is too specific.
For now the internal_format arguments haven't actually been removed
but this patch does introduce replacement apis for controlling the
internal format:
cogl_texture_set_components() lets you specify what components your
texture needs when it is allocated.
cogl_texture_set_premultiplied() lets you specify whether a texture
data should be interpreted as premultiplied or not.
- Enable us to support asynchronous texture loading + allocation in the
future.
Of note, the _new_from_data() texture constructors all continue to
allocate textures immediately so that existing code doesn't need to be
adapted to manage the lifetime of the data being uploaded.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 6a83de9ef4210f380a31f410797447b365a8d02c)
Note: Compared to the original patch, the ->premultipled state for
textures isn't forced to be %TRUE in _cogl_texture_init since that
effectively ignores the users explicitly given internal_format which was
a mistake and on master that change should have been made in the patch
that followed. The gtk-doc comments for cogl_texture_set_premultiplied()
and cogl_texture_set_components() have also been updated in-line with
this fix.
2014-01-09 15:49:46 +00:00
..
2014-01-09 15:49:35 +00:00
2014-01-09 15:49:46 +00:00
2013-05-29 19:30:44 +01:00
2014-01-09 15:49:46 +00:00
2013-12-04 17:22:01 +00:00
2011-09-09 15:06:31 +01:00
2011-05-06 12:12:08 +01:00
2011-09-09 15:06:31 +01:00
2014-01-09 15:49:46 +00:00
2014-01-09 15:49:46 +00:00
2014-01-09 15:49:46 +00:00
2013-07-29 16:57:33 +01:00
2013-07-29 16:57:33 +01:00
2011-05-16 14:31:31 +01:00
2013-09-23 18:37:29 +01:00
2013-09-23 15:02:31 +01:00
2013-06-07 16:53:29 +01:00
2013-12-04 18:38:44 +00:00
2013-09-23 15:02:31 +01:00
2013-11-28 18:12:22 +00:00
2013-01-22 18:00:11 +00:00
2013-04-04 13:37:51 +01:00
2013-07-29 16:31:44 +01:00
2013-07-29 16:59:37 +01:00
2013-09-23 15:02:31 +01:00
2013-06-06 21:45:11 +01:00
2013-01-22 17:48:05 +00:00
2013-11-28 18:12:22 +00:00
2013-01-22 17:47:39 +00:00
2014-01-09 15:49:35 +00:00
2013-01-22 17:48:08 +00:00
2013-01-22 17:48:17 +00:00
2012-08-06 14:27:45 +01:00
2013-01-22 17:48:07 +00:00
2013-11-28 18:12:22 +00:00
2013-11-27 19:33:44 +00:00
2013-12-03 15:28:35 +00:00
2013-08-19 22:44:35 +01:00
2013-06-13 13:45:47 +01:00
2013-06-13 13:45:47 +01:00
2012-08-06 14:27:39 +01:00
2013-07-09 22:52:49 +01:00
2013-08-20 19:18:40 -04:00
2012-08-06 18:51:33 +01:00
2013-01-22 17:47:24 +00:00
2013-11-28 18:12:22 +00:00
2014-01-09 15:49:46 +00:00
2013-09-23 15:02:31 +01:00
2012-08-06 14:27:40 +01:00
2013-05-29 19:30:44 +01:00
2013-01-22 17:48:05 +00:00
2013-01-22 17:48:05 +00:00
2013-08-30 12:04:36 +01:00
2013-08-30 12:04:36 +01:00
2010-03-01 12:56:10 +00:00
2011-05-16 18:45:51 +01:00
2012-08-06 14:27:39 +01:00
2013-09-06 18:42:09 +01:00
2013-10-28 16:34:57 +00:00
2013-08-23 16:44:07 +01:00
2013-09-23 15:02:31 +01:00
2014-01-09 15:49:46 +00:00
2012-08-06 18:51:32 +01:00
2013-01-22 17:48:05 +00:00
2013-07-29 18:31:36 +01:00
2013-01-22 17:48:16 +00:00
2013-01-22 17:48:08 +00:00
2013-06-27 14:29:51 +01:00
2013-05-29 11:58:48 +01:00
2012-08-06 14:27:39 +01:00
2013-01-22 17:48:13 +00:00
2013-01-22 17:48:01 +00:00
2013-01-22 17:48:17 +00:00
2013-06-13 13:45:47 +01:00
2013-06-13 13:45:47 +01:00
2013-09-23 15:02:31 +01:00
2013-01-22 17:48:05 +00:00
2013-01-30 20:09:49 +00:00
2013-01-30 20:09:49 +00:00
2013-09-23 15:02:31 +01:00
2014-01-09 15:49:46 +00:00
2014-01-09 15:49:46 +00:00
2014-01-09 15:29:30 +00:00
2012-08-06 14:27:45 +01:00
2012-08-06 14:27:45 +01:00
2013-06-13 13:45:47 +01:00
2014-01-09 15:29:30 +00:00
2013-01-08 14:56:25 +01:00
2013-11-28 16:59:55 +00:00
2013-04-30 16:39:31 +01:00
2013-09-06 18:42:10 +01:00
2013-09-02 16:22:08 +01:00
2013-09-02 16:22:01 +01:00
2013-11-28 18:12:22 +00:00
2013-04-30 16:39:31 +01:00
2013-04-30 16:39:31 +01:00
2012-08-06 14:27:42 +01:00
2013-08-19 22:44:45 +01:00
2012-08-06 14:27:39 +01:00
2013-05-29 19:30:44 +01:00
2011-05-16 14:31:31 +01:00
2013-01-22 17:47:59 +00:00
2013-09-23 15:02:31 +01:00
2011-05-16 14:31:31 +01:00
2013-01-22 17:48:07 +00:00
2013-01-22 17:48:13 +00:00
2013-06-13 13:45:47 +01:00
2013-11-28 18:12:22 +00:00
2013-08-23 13:55:42 +01:00
2013-01-22 17:48:05 +00:00
2013-06-13 13:45:47 +01:00
2013-06-13 13:45:47 +01:00
2014-01-09 15:29:30 +00:00
2013-01-22 17:48:05 +00:00
2012-08-06 14:27:40 +01:00
2013-01-22 17:48:05 +00:00
2013-01-22 17:48:19 +00:00
2013-11-28 18:12:22 +00:00
2013-09-23 15:02:31 +01:00
2013-01-18 17:28:25 +00:00
2013-09-23 15:02:31 +01:00
2013-01-22 17:48:05 +00:00
2013-06-13 13:45:47 +01:00
2013-01-22 20:11:25 +00:00
2013-11-27 19:33:44 +00:00
2013-06-13 13:45:47 +01:00
2013-06-13 13:45:47 +01:00
2012-08-06 14:27:39 +01:00
2012-02-20 23:16:37 +00:00
2013-09-23 15:02:30 +01:00
2013-08-30 12:04:36 +01:00
2013-07-11 14:22:12 +01:00
2011-11-01 12:03:02 +00:00
2012-08-06 14:27:42 +01:00
2013-09-06 18:42:10 +01:00
2014-01-09 15:29:30 +00:00
2013-09-23 15:02:31 +01:00
2013-01-30 19:56:45 +00:00
2013-01-30 19:56:45 +00:00
2013-09-06 18:42:09 +01:00
2011-05-16 13:28:17 +01:00
2013-06-21 14:18:37 +01:00
2013-01-22 17:48:16 +00:00
2013-06-06 21:49:14 +01:00
2013-04-04 13:38:43 +01:00
2013-04-04 13:38:41 +01:00
2013-04-04 13:38:43 +01:00
2012-08-06 14:27:39 +01:00
2013-06-06 21:27:09 +01:00
2013-09-23 15:02:30 +01:00
2014-01-09 15:49:35 +00:00
2013-06-21 14:18:37 +01:00
2013-06-13 13:45:46 +01:00
2013-06-13 13:45:46 +01:00
2013-06-21 14:18:37 +01:00
2013-11-28 18:12:22 +00:00
2013-09-23 15:02:30 +01:00
2013-11-28 18:12:22 +00:00
2013-09-23 15:02:30 +01:00
2013-01-22 17:48:05 +00:00
2013-01-22 17:48:07 +00:00
2013-09-23 15:02:31 +01:00
2013-01-22 17:48:05 +00:00
2012-08-06 14:27:39 +01:00
2013-07-01 13:47:48 +01:00
2013-07-11 14:22:12 +01:00
2013-04-30 16:39:31 +01:00
2013-07-29 18:31:36 +01:00
2012-08-06 14:27:39 +01:00
2013-11-27 19:33:44 +00:00
2013-07-29 18:31:36 +01:00
2013-09-23 18:38:49 +01:00
2013-01-22 17:48:05 +00:00
2013-01-22 17:48:17 +00:00
2013-01-22 17:48:05 +00:00
2013-11-28 18:12:22 +00:00
2013-05-29 19:30:44 +01:00
2010-09-14 12:43:17 +01:00
2011-05-16 14:11:47 +01:00
2013-01-22 17:48:13 +00:00
2013-09-06 18:42:09 +01:00
2012-08-06 14:27:39 +01:00
2013-01-22 17:48:05 +00:00
2013-11-28 18:12:22 +00:00
2013-11-28 18:12:22 +00:00
2013-09-23 15:02:31 +01:00
2012-08-06 14:27:41 +01:00
2013-11-28 18:12:22 +00:00
2013-06-13 13:45:47 +01:00
2013-12-11 18:49:19 +00:00
2012-08-06 14:27:39 +01:00
2012-08-06 14:27:39 +01:00
2013-09-02 16:22:08 +01:00
2013-01-22 17:48:17 +00:00
2012-08-06 14:27:39 +01:00
2013-01-22 17:48:17 +00:00
2014-01-09 15:49:46 +00:00
2013-09-23 15:02:30 +01:00
2012-08-06 14:27:39 +01:00
2012-08-06 14:27:39 +01:00
2013-01-22 17:48:05 +00:00
2014-01-09 15:49:46 +00:00
2014-01-09 15:49:46 +00:00
2014-01-09 15:49:46 +00:00
2014-01-09 15:49:46 +00:00
2014-01-09 15:49:46 +00:00
2014-01-09 15:49:46 +00:00
2014-01-09 15:49:46 +00:00
2013-01-22 17:48:17 +00:00
2014-01-09 15:49:46 +00:00
2014-01-09 15:49:46 +00:00
2013-01-22 17:48:09 +00:00
2014-01-09 15:49:46 +00:00
2013-01-22 17:48:17 +00:00
2014-01-09 15:49:46 +00:00
2014-01-09 15:49:46 +00:00
2014-01-09 15:49:46 +00:00
2014-01-09 15:49:46 +00:00
2013-07-04 11:40:39 +01:00
2012-08-14 18:55:42 +01:00
2013-10-28 16:34:57 +00:00
2012-08-06 14:27:39 +01:00
2013-01-22 17:48:16 +00:00
2014-01-09 15:29:30 +00:00
2013-11-28 16:59:55 +00:00
2013-07-09 15:46:46 +01:00
2013-11-28 18:12:22 +00:00
2013-05-30 13:41:44 +01:00
2013-05-30 13:41:44 +01:00
2013-01-30 20:09:49 +00:00
2012-02-20 23:12:45 +00:00
2013-04-30 16:39:31 +01:00
2013-05-28 21:36:03 +01:00
2013-11-28 16:59:55 +00:00
2013-01-22 17:48:17 +00:00
2013-11-28 16:59:55 +00:00
2013-06-06 21:27:09 +01:00
2014-01-09 15:49:35 +00:00
2013-08-30 12:04:36 +01:00
2013-10-28 16:34:57 +00:00
2014-01-09 15:49:35 +00:00
2013-01-18 17:28:25 +00:00