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

Unified Diff: cc/playback/display_item_list.cc

Issue 2722163003: Restore swap to clear display item list visual rects. (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | no next file » | 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 0febc8839ae601bc69a2bbd644dd14685a4cb80c..dc40961fc7cf0b3894d854faa5bb12ac69e4775f 100644
--- a/cc/playback/display_item_list.cc
+++ b/cc/playback/display_item_list.cc
@@ -118,12 +118,10 @@ void DisplayItemList::Finalize() {
<< inputs_.visual_rects.size();
rtree_.Build(inputs_.visual_rects);
- // TODO(wkorman): Restore the below, potentially with a switch to allow
- // clearing visual rects except for Blimp engine. http://crbug.com/633750
- // if (!retain_visual_rects_)
- // // This clears both the vector and the vector's capacity, since
- // // visual_rects won't be used anymore.
- // std::vector<gfx::Rect>().swap(inputs_.visual_rects);
+ if (!retain_visual_rects_)
+ // This clears both the vector and the vector's capacity, since
+ // visual_rects won't be used anymore.
+ std::vector<gfx::Rect>().swap(inputs_.visual_rects);
}
bool DisplayItemList::IsSuitableForGpuRasterization() const {
@@ -142,8 +140,6 @@ size_t DisplayItemList::ApproximateMemoryUsage() const {
size_t memory_usage = sizeof(*this);
size_t external_memory_usage = 0;
- // Warning: this double-counts SkPicture data if use_cached_picture is
- // also true.
for (const auto& item : inputs_.items) {
size_t bytes = 0;
switch (item.type()) {
@@ -246,7 +242,7 @@ void DisplayItemList::EmitTraceSnapshot() const {
}
void DisplayItemList::GenerateDiscardableImagesMetadata() {
- // This should be only called once, and only after CreateAndCacheSkPicture.
+ // This should be only called once.
DCHECK(image_map_.empty());
gfx::Rect bounds = rtree_.GetBounds();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698