diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-11-02 12:57:44 +0100 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-11-02 12:57:44 +0100 |
commit | 66c30b0e58d25a071f2c6ef3af0576cb06ec0adc (patch) | |
tree | f39a97f68ab6359daf6a16fca2a68c7386f093bd /plugins | |
parent | 2bb86f574e1ed7aee6d01d692b8935aff4f8141d (diff) |
gtkui: fixed major playlist drawing peformance regression
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/gtkui/ddblistview.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/plugins/gtkui/ddblistview.c b/plugins/gtkui/ddblistview.c index 7631c16a..cec81177 100644 --- a/plugins/gtkui/ddblistview.c +++ b/plugins/gtkui/ddblistview.c @@ -730,9 +730,6 @@ ddb_listview_list_render (DdbListview *listview, cairo_t *cr, int x, int y, int for (int i = 0; i < grp->num_items; i++) { ii++; -// if (grp_y + listview->grouptitle_height + (i+1) * listview->rowheight >= y + h + listview->scrollpos) { -// break; -// } if (grp_y + listview->grouptitle_height + i * listview->rowheight >= y + h + listview->scrollpos) { break; } @@ -749,12 +746,6 @@ ddb_listview_list_render (DdbListview *listview, cairo_t *cr, int x, int y, int ddb_listview_list_render_row_background (listview, cr, it, (idx + 1 + i) & 1, (abs_idx+i) == listview->binding->cursor () ? 1 : 0, -listview->hscrollpos, grp_y + listview->grouptitle_height + i * listview->rowheight - listview->scrollpos, listview->totalwidth, listview->rowheight); ddb_listview_list_render_row_foreground (listview, cr, it, grp->head, (idx + 1 + i) & 1, (idx+i) == listview->binding->cursor () ? 1 : 0, i * listview->rowheight, grp->height, grp->pinned, grp_next_y - listview->scrollpos, -listview->hscrollpos, grp_y + listview->grouptitle_height + i * listview->rowheight - listview->scrollpos, listview->totalwidth, listview->rowheight); } - if (grp->pinned == 1 && gtkui_groups_pinned && y <= 0) { - ddb_listview_list_render_row_background (listview, cr, NULL, group_idx & 1, 0, -listview->hscrollpos, y, listview->totalwidth, listview->grouptitle_height); - if (listview->binding->draw_group_title && listview->grouptitle_height > 0) { - listview->binding->draw_group_title (listview, cr, it, -listview->hscrollpos, y - pushback, listview->totalwidth, listview->grouptitle_height); - } - } DdbListviewIter next = listview->binding->next (it); listview->binding->unref (it); it = next; @@ -762,6 +753,12 @@ ddb_listview_list_render (DdbListview *listview, cairo_t *cr, int x, int y, int break; // sanity check, in case groups were not rebuilt yet } } + if (grp->pinned == 1 && gtkui_groups_pinned && y <= 0) { + ddb_listview_list_render_row_background (listview, cr, NULL, group_idx & 1, 0, -listview->hscrollpos, y, listview->totalwidth, listview->grouptitle_height); + if (listview->binding->draw_group_title && listview->grouptitle_height > 0) { + listview->binding->draw_group_title (listview, cr, grp->head, -listview->hscrollpos, y - pushback, listview->totalwidth, listview->grouptitle_height); + } + } idx += grp->num_items + 1; abs_idx += grp->num_items; |