Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1856)

Unified Diff: cc/playback/display_item_list.cc

Issue 1163803003: cc: Implement RemoveLast for DisplayItemList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: danakj comments Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/playback/display_item_list.h ('k') | cc/quads/list_container_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « cc/playback/display_item_list.h ('k') | cc/quads/list_container_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698