+Cairo::RefPtr<Cairo::Pattern> AudioRegionView::pending_peak_pattern;
+
+static Cairo::RefPtr<Cairo::Pattern> create_pending_peak_pattern() {
+ cairo_surface_t * is = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 8, 8);
+
+ // create checker pattern
+ unsigned char *img = cairo_image_surface_get_data (is);
+ cairo_surface_flush (is);
+ const int stride = cairo_image_surface_get_stride (is);
+
+ for (int y = 0; y < 8; ++y) {
+ for (int x = 0; x < 8; ++x) {
+ const int off = (y * stride + x * 4);
+ uint32_t *pixel = (uint32_t*) &img[off];
+ if ((x < 4) ^ (y < 4)) {
+ *pixel = 0xa0000000;
+ } else {
+ *pixel = 0x40000000;
+ }
+ }
+ }
+ cairo_surface_mark_dirty (is);
+
+ cairo_pattern_t* pat = cairo_pattern_create_for_surface (is);
+ cairo_pattern_set_extend (pat, CAIRO_EXTEND_REPEAT);
+ Cairo::RefPtr<Cairo::Pattern> p (new Cairo::Pattern (pat, false));
+ cairo_surface_destroy (is);
+ return p;
+}
+