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

Side by Side Diff: cc/playback/display_item_list.h

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, 6 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 unified diff | Download patch
« no previous file with comments | « cc/base/sidecar_list_container_unittest.cc ('k') | cc/playback/display_item_list.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ 5 #ifndef CC_PLAYBACK_DISPLAY_ITEM_LIST_H_
6 #define CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ 6 #define CC_PLAYBACK_DISPLAY_ITEM_LIST_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 template <typename DisplayItemType> 47 template <typename DisplayItemType>
48 DisplayItemType* CreateAndAppendItem() { 48 DisplayItemType* CreateAndAppendItem() {
49 #if DCHECK_IS_ON() 49 #if DCHECK_IS_ON()
50 needs_process_ = true; 50 needs_process_ = true;
51 #endif 51 #endif
52 ProcessAppendedItemsOnTheFly(); 52 ProcessAppendedItemsOnTheFly();
53 return items_.AllocateAndConstruct<DisplayItemType>(); 53 return items_.AllocateAndConstruct<DisplayItemType>();
54 } 54 }
55 55
56 // Removes the last item. This cannot be called on lists with cached pictures
57 // (since the data may already have been incorporated into cached picture
58 // sizes, etc).
59 void RemoveLast();
60
56 // Called after all items are appended, to process the items and, if 61 // Called after all items are appended, to process the items and, if
57 // applicable, create an internally cached SkPicture. 62 // applicable, create an internally cached SkPicture.
58 void Finalize(); 63 void Finalize();
59 64
60 bool IsSuitableForGpuRasterization() const; 65 bool IsSuitableForGpuRasterization() const;
61 int ApproximateOpCount() const; 66 int ApproximateOpCount() const;
62 size_t PictureMemoryUsage() const; 67 size_t PictureMemoryUsage() const;
63 68
64 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; 69 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
65 70
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 111
107 friend class base::RefCountedThreadSafe<DisplayItemList>; 112 friend class base::RefCountedThreadSafe<DisplayItemList>;
108 friend class PixelRefMap::Iterator; 113 friend class PixelRefMap::Iterator;
109 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, PictureMemoryUsage); 114 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, PictureMemoryUsage);
110 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); 115 DISALLOW_COPY_AND_ASSIGN(DisplayItemList);
111 }; 116 };
112 117
113 } // namespace cc 118 } // namespace cc
114 119
115 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ 120 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_
OLDNEW
« no previous file with comments | « cc/base/sidecar_list_container_unittest.cc ('k') | cc/playback/display_item_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698