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

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

Issue 2857923004: cc: Keep PaintImage in DrawImage. (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
« 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 size_t ApproximateMemoryUsage() const; 134 size_t ApproximateMemoryUsage() const;
135 bool ShouldBeAnalyzedForSolidColor() const; 135 bool ShouldBeAnalyzedForSolidColor() const;
136 136
137 void EmitTraceSnapshot() const; 137 void EmitTraceSnapshot() const;
138 138
139 void GenerateDiscardableImagesMetadata(); 139 void GenerateDiscardableImagesMetadata();
140 void GetDiscardableImagesInRect(const gfx::Rect& rect, 140 void GetDiscardableImagesInRect(const gfx::Rect& rect,
141 float contents_scale, 141 float contents_scale,
142 const gfx::ColorSpace& target_color_space, 142 const gfx::ColorSpace& target_color_space,
143 std::vector<DrawImage>* images); 143 std::vector<DrawImage>* images);
144 gfx::Rect GetRectForImage(ImageId image_id) const; 144 gfx::Rect GetRectForImage(PaintImage::Id image_id) const;
145 145
146 void SetRetainVisualRectsForTesting(bool retain) { 146 void SetRetainVisualRectsForTesting(bool retain) {
147 retain_visual_rects_ = retain; 147 retain_visual_rects_ = retain;
148 } 148 }
149 149
150 size_t size() const { return items_.size(); } 150 size_t size() const { return items_.size(); }
151 151
152 gfx::Rect VisualRectForTesting(int index) { return visual_rects_[index]; } 152 gfx::Rect VisualRectForTesting(int index) { return visual_rects_[index]; }
153 153
154 ContiguousContainer<DisplayItem>::const_iterator begin() const { 154 ContiguousContainer<DisplayItem>::const_iterator begin() const {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 bool has_discardable_images_ = false; 207 bool has_discardable_images_ = false;
208 208
209 friend class base::RefCountedThreadSafe<DisplayItemList>; 209 friend class base::RefCountedThreadSafe<DisplayItemList>;
210 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage); 210 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage);
211 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); 211 DISALLOW_COPY_AND_ASSIGN(DisplayItemList);
212 }; 212 };
213 213
214 } // namespace cc 214 } // namespace cc
215 215
216 #endif // CC_PAINT_DISPLAY_ITEM_LIST_H_ 216 #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