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

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

Issue 2204053003: Don't clear visual rects when finalizing display item lists for now. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | no next file » | 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 #include "cc/playback/display_item_list.h" 5 #include "cc/playback/display_item_list.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 void DisplayItemList::Finalize() { 150 void DisplayItemList::Finalize() {
151 TRACE_EVENT0("cc", "DisplayItemList::Finalize"); 151 TRACE_EVENT0("cc", "DisplayItemList::Finalize");
152 // TODO(dtrainor): Need to deal with serializing inputs_.visual_rects. 152 // TODO(dtrainor): Need to deal with serializing inputs_.visual_rects.
153 // http://crbug.com/568757. 153 // http://crbug.com/568757.
154 DCHECK(inputs_.items.size() == inputs_.visual_rects.size()) 154 DCHECK(inputs_.items.size() == inputs_.visual_rects.size())
155 << "items.size() " << inputs_.items.size() << " visual_rects.size() " 155 << "items.size() " << inputs_.items.size() << " visual_rects.size() "
156 << inputs_.visual_rects.size(); 156 << inputs_.visual_rects.size();
157 rtree_.Build(inputs_.visual_rects); 157 rtree_.Build(inputs_.visual_rects);
158 158
159 if (!retain_visual_rects_) 159 // TODO(wkorman): Restore the below, potentially with a switch to allow
160 // This clears both the vector and the vector's capacity, since 160 // clearing visual rects except for Blimp engine. http://crbug.com/633750
161 // visual_rects won't be used anymore. 161 // if (!retain_visual_rects_)
Khushal 2016/08/03 00:29:05 We don't really need to do any post processing on
wkorman 2016/08/03 00:37:00 Yes, I wanted to do things more cleanly in a separ
Khushal 2016/08/03 00:44:42 Sorry for being unclear. I was suggesting that you
162 std::vector<gfx::Rect>().swap(inputs_.visual_rects); 162 // // This clears both the vector and the vector's capacity, since
163 // // visual_rects won't be used anymore.
164 // std::vector<gfx::Rect>().swap(inputs_.visual_rects);
163 } 165 }
164 166
165 bool DisplayItemList::IsSuitableForGpuRasterization() const { 167 bool DisplayItemList::IsSuitableForGpuRasterization() const {
166 // TODO(wkorman): This is more permissive than Picture's implementation, since 168 // TODO(wkorman): This is more permissive than Picture's implementation, since
167 // none of the items might individually trigger a veto even though they 169 // none of the items might individually trigger a veto even though they
168 // collectively have enough "bad" operations that a corresponding Picture 170 // collectively have enough "bad" operations that a corresponding Picture
169 // would get vetoed. See crbug.com/513016. 171 // would get vetoed. See crbug.com/513016.
170 return inputs_.all_items_are_suitable_for_gpu_rasterization; 172 return inputs_.all_items_are_suitable_for_gpu_rasterization;
171 } 173 }
172 174
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 } 256 }
255 257
256 void DisplayItemList::GetDiscardableImagesInRect( 258 void DisplayItemList::GetDiscardableImagesInRect(
257 const gfx::Rect& rect, 259 const gfx::Rect& rect,
258 float raster_scale, 260 float raster_scale,
259 std::vector<DrawImage>* images) { 261 std::vector<DrawImage>* images) {
260 image_map_.GetDiscardableImagesInRect(rect, raster_scale, images); 262 image_map_.GetDiscardableImagesInRect(rect, raster_scale, images);
261 } 263 }
262 264
263 } // namespace cc 265 } // namespace cc
OLDNEW
« 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