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

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

Issue 2842333003: cc: Update discardable image metadata generation to get PaintImages. (Closed)
Patch Set: win 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
« no previous file with comments | « cc/paint/discardable_image_store.cc ('k') | cc/paint/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_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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 gfx::Rect VisualRectForTesting(int index) { return visual_rects_[index]; } 157 gfx::Rect VisualRectForTesting(int index) { return visual_rects_[index]; }
158 158
159 ContiguousContainer<DisplayItem>::const_iterator begin() const { 159 ContiguousContainer<DisplayItem>::const_iterator begin() const {
160 return items_.begin(); 160 return items_.begin();
161 } 161 }
162 162
163 ContiguousContainer<DisplayItem>::const_iterator end() const { 163 ContiguousContainer<DisplayItem>::const_iterator end() const {
164 return items_.end(); 164 return items_.end();
165 } 165 }
166 166
167 void GatherDiscardableImages(DiscardableImageStore* image_store) const;
168 const DiscardableImageMap& discardable_image_map_for_testing() const {
169 return image_map_;
170 }
171
167 bool has_discardable_images() const { return has_discardable_images_; } 172 bool has_discardable_images() const { return has_discardable_images_; }
168 173
169 private: 174 private:
170 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, AsValueWithNoItems); 175 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, AsValueWithNoItems);
171 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, AsValueWithItems); 176 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, AsValueWithItems);
172 177
173 ~DisplayItemList(); 178 ~DisplayItemList();
174 179
175 std::unique_ptr<base::trace_event::TracedValue> CreateTracedValue( 180 std::unique_ptr<base::trace_event::TracedValue> CreateTracedValue(
176 bool include_items) const; 181 bool include_items) const;
(...skipping 30 matching lines...) Expand all
207 bool has_discardable_images_ = false; 212 bool has_discardable_images_ = false;
208 213
209 friend class base::RefCountedThreadSafe<DisplayItemList>; 214 friend class base::RefCountedThreadSafe<DisplayItemList>;
210 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage); 215 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage);
211 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); 216 DISALLOW_COPY_AND_ASSIGN(DisplayItemList);
212 }; 217 };
213 218
214 } // namespace cc 219 } // namespace cc
215 220
216 #endif // CC_PAINT_DISPLAY_ITEM_LIST_H_ 221 #endif // CC_PAINT_DISPLAY_ITEM_LIST_H_
OLDNEW
« no previous file with comments | « cc/paint/discardable_image_store.cc ('k') | cc/paint/display_item_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698