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

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

Issue 2842333003: cc: Update discardable image metadata generation to get PaintImages. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
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_PAINT_DISPLAY_ITEM_LIST_H_ 5 #ifndef CC_PAINT_DISPLAY_ITEM_LIST_H_
6 #define CC_PAINT_DISPLAY_ITEM_LIST_H_ 6 #define CC_PAINT_DISPLAY_ITEM_LIST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 gfx::Rect VisualRectForTesting(int index) { return visual_rects_[index]; } 156 gfx::Rect VisualRectForTesting(int index) { return visual_rects_[index]; }
157 157
158 ContiguousContainer<DisplayItem>::const_iterator begin() const { 158 ContiguousContainer<DisplayItem>::const_iterator begin() const {
159 return items_.begin(); 159 return items_.begin();
160 } 160 }
161 161
162 ContiguousContainer<DisplayItem>::const_iterator end() const { 162 ContiguousContainer<DisplayItem>::const_iterator end() const {
163 return items_.end(); 163 return items_.end();
164 } 164 }
165 165
166 void GatherDiscardableImages(DiscardableImageStore* image_store) const;
167 const DiscardableImageMap& discardable_image_map_for_testing() const {
168 return image_map_;
169 }
170
166 bool has_discardable_images() const { return has_discardable_images_; } 171 bool has_discardable_images() const { return has_discardable_images_; }
167 172
168 private: 173 private:
169 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, AsValueWithNoItems); 174 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, AsValueWithNoItems);
170 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, AsValueWithItems); 175 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, AsValueWithItems);
171 176
172 ~DisplayItemList(); 177 ~DisplayItemList();
173 178
174 std::unique_ptr<base::trace_event::TracedValue> CreateTracedValue( 179 std::unique_ptr<base::trace_event::TracedValue> CreateTracedValue(
175 bool include_items) const; 180 bool include_items) const;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 bool has_discardable_images_ = false; 213 bool has_discardable_images_ = false;
209 214
210 friend class base::RefCountedThreadSafe<DisplayItemList>; 215 friend class base::RefCountedThreadSafe<DisplayItemList>;
211 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage); 216 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage);
212 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); 217 DISALLOW_COPY_AND_ASSIGN(DisplayItemList);
213 }; 218 };
214 219
215 } // namespace cc 220 } // namespace cc
216 221
217 #endif // CC_PAINT_DISPLAY_ITEM_LIST_H_ 222 #endif // CC_PAINT_DISPLAY_ITEM_LIST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698