Index: cc/playback/display_item_list.cc |
diff --git a/cc/playback/display_item_list.cc b/cc/playback/display_item_list.cc |
index 5ee754ba7605a8b96bd9dd72f266a7b05940ea72..66c4ecd277be775da2b5be4051f0c6c32eb0a89c 100644 |
--- a/cc/playback/display_item_list.cc |
+++ b/cc/playback/display_item_list.cc |
@@ -159,6 +159,15 @@ void DisplayItemList::ProcessAppendedItems() { |
items_.clear(); |
} |
+void DisplayItemList::RemoveLast() { |
+ // We cannot remove the last item if it has been squashed into a picture. |
+ // The last item should not have been handled by ProcessAppendedItems, so we |
+ // don't need to remove it from approximate_op_count_, etc. |
+ DCHECK(retain_individual_display_items_); |
+ DCHECK(!use_cached_picture_); |
+ items_.RemoveLast(); |
+} |
+ |
void DisplayItemList::Finalize() { |
ProcessAppendedItems(); |