This looks good to me:<div><br></div><div>Reviewed-by: Robert Bragg <<a href="mailto:robert@linux.intel.com">robert@linux.intel.com</a>></div><div><br></div><div>thanks,</div><div>- Robert</div><br><div class="gmail_quote">
On Thu, Nov 8, 2012 at 3:30 PM, Neil Roberts <span dir="ltr"><<a href="mailto:neil@linux.intel.com" target="_blank">neil@linux.intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
• blended_color_pipeline and texture_pipeline. These were only used<br>
for cogl_set_source_color and cogl_set_source_texture which no<br>
longer exist.<br>
<br>
• polygon_vertices. This was used to implement cogl_polygon which no<br>
longer exists.<br>
<br>
• quad_buffer_indices*. These were used for<br>
cogl_vertex_buffer_indices_get_for_quads() which has been replaced<br>
with cogl_get_rectangle_indices()<br>
<br>
• in_begin_gl_block. This was used for cogl_begin_gl().<br>
<br>
• max_texture_image_units. This was used by the internal<br>
get_max_texture_image_units() which was removed in<br>
4e1d08d59e65fd06a3fa10e2be147fc290<br>
<br>
• buffer_types: This was moved to a real global variable in<br>
3ea6acc072d9f1.<br>
<br>
• current_clip_stack_uses_stencil. This was used to determine if<br>
drawing a path will collide the stencil clip. Paths are now drawn<br>
using the stencil clip so this no longer matters.<br>
---<br>
cogl/cogl-context-private.h | 22 +---------------------<br>
cogl/cogl-context.c | 24 ------------------------<br>
cogl/driver/gl/cogl-clip-stack-gl.c | 3 ---<br>
3 files changed, 1 insertion(+), 48 deletions(-)<br>
<br>
diff --git a/cogl/cogl-context-private.h b/cogl/cogl-context-private.h<br>
index 37743c4..1b4f70f 100644<br>
--- a/cogl/cogl-context-private.h<br>
+++ b/cogl/cogl-context-private.h<br>
@@ -129,9 +129,7 @@ struct _CoglContext<br>
int active_texture_unit;<br>
<br>
/* Pipelines */<br>
- CoglPipeline *opaque_color_pipeline; /* used for set_source_color */<br>
- CoglPipeline *blended_color_pipeline; /* used for set_source_color */<br>
- CoglPipeline *texture_pipeline; /* used for set_source_texture */<br>
+ CoglPipeline *opaque_color_pipeline; /* to check for simple pipelines */<br>
GString *codegen_header_buffer;<br>
GString *codegen_source_buffer;<br>
<br>
@@ -150,8 +148,6 @@ struct _CoglContext<br>
GArray *journal_flush_attributes_array;<br>
GArray *journal_clip_bounds;<br>
<br>
- GArray *polygon_vertices;<br>
-<br>
/* Some simple caching, to minimize state changes... */<br>
CoglPipeline *current_pipeline;<br>
unsigned long current_pipeline_changes_since_flush;<br>
@@ -187,16 +183,10 @@ struct _CoglContext<br>
<br>
/* Pre-generated VBOs containing indices to generate GL_TRIANGLES<br>
out of a vertex array of quads */<br>
- CoglIndices *quad_buffer_indices_byte;<br>
- unsigned int quad_buffer_indices_len;<br>
- CoglIndices *quad_buffer_indices;<br>
-<br>
CoglIndices *rectangle_byte_indices;<br>
CoglIndices *rectangle_short_indices;<br>
int rectangle_short_indices_len;<br>
<br>
- CoglBool in_begin_gl_block;<br>
-<br>
CoglPipeline *texture_download_pipeline;<br>
CoglPipeline *blit_texture_pipeline;<br>
<br>
@@ -212,7 +202,6 @@ struct _CoglContext<br>
/* Cached values for GL_MAX_TEXTURE_[IMAGE_]UNITS to avoid calling<br>
glGetInteger too often */<br>
GLint max_texture_units;<br>
- GLint max_texture_image_units;<br>
GLint max_activateable_texture_units;<br>
<br>
CoglPipelineProgramType current_fragment_program_type;<br>
@@ -226,10 +215,6 @@ struct _CoglContext<br>
cogl_is_texture */<br>
GSList *texture_types;<br>
<br>
- /* List of types that will be considered a subclass of CoglBuffer in<br>
- cogl_is_buffer */<br>
- GSList *buffer_types;<br>
-<br>
/* Clipping */<br>
/* TRUE if we have a valid clipping stack flushed. In that case<br>
current_clip_stack will describe what the current state is. If<br>
@@ -246,11 +231,6 @@ struct _CoglContext<br>
same state multiple times. When the clip state is flushed this<br>
will hold a reference */<br>
CoglClipStack *current_clip_stack;<br>
- /* Whether the stencil buffer was used as part of the current clip<br>
- state. If TRUE then any further use of the stencil buffer (such<br>
- as for drawing paths) would need to be merged with the existing<br>
- stencil buffer */<br>
- CoglBool current_clip_stack_uses_stencil;<br>
<br>
/* This is used as a temporary buffer to fill a CoglBuffer when<br>
cogl_buffer_map fails and we only want to map to fill it with new<br>
diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c<br>
index c70e020..d4f971d 100644<br>
--- a/cogl/cogl-context.c<br>
+++ b/cogl/cogl-context.c<br>
@@ -165,7 +165,6 @@ cogl_context_new (CoglDisplay *display,<br>
context->private_feature_flags = 0;<br>
<br>
context->texture_types = NULL;<br>
- context->buffer_types = NULL;<br>
<br>
context->rectangle_state = COGL_WINSYS_RECTANGLE_STATE_UNKNOWN;<br>
<br>
@@ -274,8 +273,6 @@ cogl_context_new (CoglDisplay *display,<br>
}<br>
<br>
context->opaque_color_pipeline = cogl_pipeline_new (context);<br>
- context->blended_color_pipeline = cogl_pipeline_new (context);<br>
- context->texture_pipeline = cogl_pipeline_new (context);<br>
context->codegen_header_buffer = g_string_new ("");<br>
context->codegen_source_buffer = g_string_new ("");<br>
<br>
@@ -295,8 +292,6 @@ cogl_context_new (CoglDisplay *display,<br>
g_array_new (TRUE, FALSE, sizeof (CoglAttribute *));<br>
context->journal_clip_bounds = NULL;<br>
<br>
- context->polygon_vertices = g_array_new (FALSE, FALSE, sizeof (float));<br>
-<br>
context->current_pipeline = NULL;<br>
context->current_pipeline_changes_since_flush = 0;<br>
context->current_pipeline_skip_gl_color = FALSE;<br>
@@ -348,12 +343,6 @@ cogl_context_new (CoglDisplay *display,<br>
<br>
context->stencil_pipeline = cogl_pipeline_new (context);<br>
<br>
- context->in_begin_gl_block = FALSE;<br>
-<br>
- context->quad_buffer_indices_byte = NULL;<br>
- context->quad_buffer_indices = NULL;<br>
- context->quad_buffer_indices_len = 0;<br>
-<br>
context->rectangle_byte_indices = NULL;<br>
context->rectangle_short_indices = NULL;<br>
context->rectangle_short_indices_len = 0;<br>
@@ -468,10 +457,6 @@ _cogl_context_free (CoglContext *context)<br>
<br>
if (context->opaque_color_pipeline)<br>
cogl_object_unref (context->opaque_color_pipeline);<br>
- if (context->blended_color_pipeline)<br>
- cogl_object_unref (context->blended_color_pipeline);<br>
- if (context->texture_pipeline)<br>
- cogl_object_unref (context->texture_pipeline);<br>
<br>
if (context->blit_texture_pipeline)<br>
cogl_object_unref (context->blit_texture_pipeline);<br>
@@ -483,14 +468,6 @@ _cogl_context_free (CoglContext *context)<br>
if (context->journal_clip_bounds)<br>
g_array_free (context->journal_clip_bounds, TRUE);<br>
<br>
- if (context->polygon_vertices)<br>
- g_array_free (context->polygon_vertices, TRUE);<br>
-<br>
- if (context->quad_buffer_indices_byte)<br>
- cogl_object_unref (context->quad_buffer_indices_byte);<br>
- if (context->quad_buffer_indices)<br>
- cogl_object_unref (context->quad_buffer_indices);<br>
-<br>
if (context->rectangle_byte_indices)<br>
cogl_object_unref (context->rectangle_byte_indices);<br>
if (context->rectangle_short_indices)<br>
@@ -521,7 +498,6 @@ _cogl_context_free (CoglContext *context)<br>
_cogl_bitmask_destroy (&context->changed_bits_tmp);<br>
<br>
g_slist_free (context->texture_types);<br>
- g_slist_free (context->buffer_types);<br>
<br>
if (context->current_modelview_entry)<br>
_cogl_matrix_entry_unref (context->current_modelview_entry);<br>
diff --git a/cogl/driver/gl/cogl-clip-stack-gl.c b/cogl/driver/gl/cogl-clip-stack-gl.c<br>
index 8d2cd4c..50bf4d8 100644<br>
--- a/cogl/driver/gl/cogl-clip-stack-gl.c<br>
+++ b/cogl/driver/gl/cogl-clip-stack-gl.c<br>
@@ -495,7 +495,6 @@ _cogl_clip_stack_gl_flush (CoglClipStack *stack,<br>
{<br>
COGL_NOTE (CLIPPING, "Flushed empty clip stack");<br>
<br>
- ctx->current_clip_stack_uses_stencil = FALSE;<br>
GE (ctx, glDisable (GL_SCISSOR_TEST));<br>
return;<br>
}<br>
@@ -662,6 +661,4 @@ _cogl_clip_stack_gl_flush (CoglClipStack *stack,<br>
setting up the stencil buffer */<br>
if (using_clip_planes)<br>
enable_clip_planes (ctx);<br>
-<br>
- ctx->current_clip_stack_uses_stencil = using_stencil_buffer;<br>
}<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.11.3.g3c3efa5<br>
<br>
_______________________________________________<br>
Cogl mailing list<br>
<a href="mailto:Cogl@lists.freedesktop.org">Cogl@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/cogl" target="_blank">http://lists.freedesktop.org/mailman/listinfo/cogl</a><br>
</font></span></blockquote></div><br>