static void paint_path_silhouette (CoglFramebuffer *framebuffer, CoglPipeline *pipeline, void *user_data) { CoglPath *path = user_data; if (path->data->path_nodes->len >= 3) _cogl_path_fill_nodes (path, framebuffer, pipeline, COGL_DRAW_SKIP_JOURNAL_FLUSH | COGL_DRAW_SKIP_PIPELINE_VALIDATION | COGL_DRAW_SKIP_FRAMEBUFFER_FLUSH); }
void cogl2_path_fill (CoglPath *path) { _COGL_RETURN_IF_FAIL (cogl_is_path (path)); if (path->data->path_nodes->len == 0) return; /* If the path is a simple rectangle then we can divert to using cogl_rectangle which should be faster because it can go through the journal instead of uploading the geometry just for two triangles */ if (path->data->is_rectangle) { float x_1, y_1, x_2, y_2; _cogl_path_get_bounds (path, &x_1, &y_1, &x_2, &y_2); cogl_rectangle (x_1, y_1, x_2, y_2); } else _cogl_path_fill_nodes (path, 0); }