Neil Roberts
2059ae3ac8
Add internal _cogl_push_source to optionally disable legacy state
...
Some code in Cogl such as when flushing a stencil clip assumes that it
can push a temporary simple pipeline to reset to a known state for
internal drawing operations. However this breaks down if the
application has set any legacy state because that is set globally so
it will also get applied to the internal pipeline.
_cogl_draw_attributes already had an internal flag to disable applying
the legacy state but I think this is quite awkward to use because not
all places that push a pipeline draw the attribute buffers directly so
it is difficult to pass the flag down through the layers.
Conceptually the legacy state is meant to be like a layer on top of
the purely pipeline-based state API so I think ideally we should have
an internal function to push the source without the applying the
legacy state. The legacy state can't be applied as the pipeline is
pushed because the global state can be modified even after it is
pushed. This patch adds a _cogl_push_source() function which takes an
extra boolean flag to mark whether to enable the legacy state. The
value of this flag is stored alongside the pipeline in the pipeline
stack. Another new internal function called
_cogl_get_enable_legacy_state queries whether the top entry in the
pipeline stack has legacy state enabled. cogl-primitives and the
vertex array drawing code now use this to determine whether to apply
the legacy state when drawing. The COGL_DRAW_SKIP_LEGACY_STATE flag is
now removed.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-09-19 16:40:06 +01:00
..
2011-08-01 14:05:09 +01:00
2010-09-12 19:25:47 +01:00
2011-09-19 16:40:06 +01:00
2011-04-11 15:28:53 +01:00
2011-03-10 13:05:43 +00:00
2011-09-09 15:06:31 +01:00
2011-09-19 16:40:06 +01:00
2010-11-11 13:17:26 +00:00
2011-05-06 12:12:08 +01:00
2011-09-09 15:06:31 +01:00
2011-05-05 17:32:28 +01:00
2011-09-05 19:02:04 +01:00
2011-07-08 15:35:51 +01:00
2011-03-14 18:18:15 +00:00
2011-05-16 14:31:31 +01:00
2011-05-16 14:31:31 +01:00
2011-05-16 14:31:31 +01:00
2011-09-19 16:40:06 +01:00
2011-09-19 16:40:06 +01:00
2011-05-16 14:32:37 +01:00
2010-07-15 17:24:01 +01:00
2011-02-15 12:40:11 +00:00
2011-07-25 22:45:24 +01:00
2011-07-25 22:45:24 +01:00
2011-07-25 22:45:24 +01:00
2010-12-13 17:28:29 +00:00
2011-04-20 18:20:10 +01:00
2011-09-05 17:54:46 +01:00
2010-06-15 15:26:27 +01:00
2011-09-19 16:40:06 +01:00
2011-02-15 12:10:54 +00:00
2011-08-12 15:28:43 +01:00
2011-07-11 12:57:38 +01:00
2011-08-12 15:28:43 +01:00
2011-09-19 16:40:06 +01:00
2011-08-12 15:28:43 +01:00
2011-08-12 15:28:43 +01:00
2011-08-12 15:28:43 +01:00
2011-03-10 13:05:43 +00:00
2011-06-01 20:44:41 +01:00
2011-04-11 17:54:36 +01:00
2010-12-07 16:00:32 +00:00
2010-06-15 15:26:27 +01:00
2010-06-15 15:26:27 +01:00
2011-08-12 15:28:42 +01:00
2011-08-12 15:28:42 +01:00
2011-07-19 19:27:09 +01:00
2011-09-05 17:54:46 +01:00
2011-09-05 17:54:46 +01:00
2011-05-05 17:32:31 +01:00
2011-08-12 15:28:42 +01:00
2011-08-12 15:28:42 +01:00
2011-06-01 20:44:42 +01:00
2010-03-01 12:56:10 +00:00
2011-05-16 18:45:51 +01:00
2011-06-14 14:40:27 +01:00
2011-06-14 17:09:55 +01:00
2011-07-29 11:50:15 +01:00
2011-09-05 19:02:05 +01:00
2011-09-06 11:19:20 +01:00
2009-10-16 18:58:50 +01:00
2009-10-16 18:58:50 +01:00
2011-05-16 14:12:42 +01:00
2011-05-16 14:12:49 +01:00
2011-08-12 15:28:42 +01:00
2011-07-27 16:10:02 +01:00
2011-07-27 16:10:02 +01:00
2011-07-27 18:46:36 +01:00
2010-06-01 12:08:18 +01:00
2011-04-20 18:20:10 +01:00
2011-08-12 15:28:43 +01:00
2011-09-05 19:02:05 +01:00
2011-09-05 19:02:05 +01:00
2011-06-30 14:34:33 +01:00
2011-07-27 16:10:02 +01:00
2010-12-07 12:16:50 +00:00
2010-06-04 14:44:15 +01:00
2011-05-16 14:31:31 +01:00
2011-05-16 14:31:31 +01:00
2011-05-16 14:31:31 +01:00
2011-05-16 14:31:31 +01:00
2011-05-16 14:31:31 +01:00
2011-05-16 14:31:31 +01:00
2011-07-13 19:06:19 +01:00
2011-06-01 14:41:59 +01:00
2011-09-19 16:40:06 +01:00
2011-06-09 16:21:15 +01:00
2011-06-09 16:21:15 +01:00
2011-07-04 15:31:50 +01:00
2011-07-11 12:57:38 +01:00
2010-12-13 17:29:13 +00:00
2011-08-12 15:28:44 +01:00
2011-08-12 15:28:44 +01:00
2011-06-14 12:14:02 +01:00
2011-06-14 12:14:02 +01:00
2011-06-14 12:14:02 +01:00
2010-09-06 16:11:46 +01:00
2011-04-11 17:54:35 +01:00
2011-04-11 17:54:35 +01:00
2011-04-11 17:54:35 +01:00
2011-05-16 13:28:17 +01:00
2011-05-16 14:31:31 +01:00
2011-04-11 15:18:12 +01:00
2010-12-22 09:52:35 +00:00
2011-07-13 12:30:07 +01:00
2011-07-13 12:30:07 +01:00
2011-07-13 12:30:07 +01:00
2011-09-09 14:40:48 +01:00
2010-12-13 17:22:57 +00:00
2011-07-13 12:30:07 +01:00
2010-12-13 17:22:57 +00:00
2011-09-05 19:02:04 +01:00
2011-09-19 16:40:00 +01:00
2011-09-19 16:40:00 +01:00
2011-09-19 16:40:00 +01:00
2010-12-13 17:22:57 +00:00
2011-09-05 17:54:46 +01:00
2011-09-19 16:40:00 +01:00
2011-01-21 16:24:14 +00:00
2011-07-13 12:30:07 +01:00
2011-09-19 16:35:59 +01:00
2011-09-19 16:35:59 +01:00
2011-09-19 16:35:59 +01:00
2010-12-13 17:22:57 +00:00
2011-07-11 12:57:38 +01:00
2010-12-13 17:28:28 +00:00
2011-07-13 12:30:07 +01:00
2011-09-19 16:40:00 +01:00
2011-09-19 16:40:06 +01:00
2011-05-16 14:31:31 +01:00
2011-07-08 15:35:46 +01:00
2011-05-16 14:31:31 +01:00
2011-03-07 13:26:19 +00:00
2011-03-07 13:26:19 +00:00
2011-05-16 14:31:31 +01:00
2011-05-16 18:34:22 +01:00
2011-05-16 14:32:37 +01:00
2010-11-04 18:10:08 +00:00
2011-09-19 16:40:06 +01:00
2010-03-25 09:33:26 +00:00
2011-09-19 16:40:06 +01:00
2011-01-24 15:45:45 +00:00
2010-09-14 12:43:17 +01:00
2010-12-13 17:22:57 +00:00
2011-07-11 12:57:38 +01:00
2011-05-16 14:11:47 +01:00
2011-07-27 18:21:27 +01:00
2011-05-16 17:08:30 +01:00
2011-07-01 17:52:55 +01:00
2011-05-17 15:24:54 +01:00
2010-08-12 11:54:42 +01:00
2011-07-27 18:46:36 +01:00
2011-09-05 17:54:46 +01:00
2011-09-05 17:54:46 +01:00
2011-07-11 12:57:38 +01:00
2011-07-11 12:57:38 +01:00
2011-07-11 12:57:38 +01:00
2010-09-03 16:59:01 +01:00
2010-03-01 12:56:10 +00:00
2010-03-01 12:56:10 +00:00
2010-03-01 12:56:10 +00:00
2011-07-25 22:45:24 +01:00
2011-05-05 14:46:02 +01:00
2011-05-05 14:46:02 +01:00
2011-05-05 14:46:02 +01:00
2011-06-01 20:44:42 +01:00
2010-11-03 18:09:23 +00:00
2011-09-05 19:02:04 +01:00
2011-09-05 19:02:04 +01:00
2011-09-05 19:02:05 +01:00
2010-11-03 18:09:23 +00:00
2011-07-11 12:57:38 +01:00
2010-07-13 14:28:52 +01:00
2011-07-08 15:35:51 +01:00
2011-09-05 19:02:04 +01:00
2010-11-03 18:09:23 +00:00
2011-09-05 19:02:04 +01:00
2011-09-19 16:40:06 +01:00
2011-07-25 22:45:24 +01:00
2011-09-19 16:40:06 +01:00
2011-04-11 17:54:36 +01:00
2011-01-10 16:55:00 +00:00
2010-05-20 17:18:24 +01:00
2010-06-30 18:51:31 +01:00
2011-05-16 14:31:31 +01:00
2011-06-13 17:48:23 +01:00
2011-02-09 19:12:12 +00:00
2011-06-30 14:34:46 +01:00
2011-06-30 14:33:13 +01:00
2011-06-30 14:34:46 +01:00
2011-06-30 14:34:33 +01:00
2011-06-30 14:34:33 +01:00
2011-06-01 20:44:42 +01:00
2011-06-30 14:34:33 +01:00
2011-09-08 15:48:07 +01:00
2011-06-30 14:34:33 +01:00
2011-06-30 14:34:33 +01:00
2011-04-20 18:17:06 +01:00
2011-09-19 16:40:06 +01:00
2011-09-19 16:40:00 +01:00
2011-09-19 16:40:00 +01:00
2011-08-12 15:28:42 +01:00