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

Unified Diff: cc/playback/display_item_list.cc

Issue 1423653005: Further plumb visual rect into cc:DisplayItemList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address more danakj@ feedback. Created 5 years, 1 month 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
Index: cc/playback/display_item_list.cc
diff --git a/cc/playback/display_item_list.cc b/cc/playback/display_item_list.cc
index 6d0edc659819aa02caa59dbb70af72f57813686b..db7814aa378fdef7b0985cfd425c512de3fee163 100644
--- a/cc/playback/display_item_list.cc
+++ b/cc/playback/display_item_list.cc
@@ -21,6 +21,7 @@
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkPictureRecorder.h"
#include "third_party/skia/include/utils/SkPictureUtils.h"
+#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/skia_util.h"
namespace cc {
@@ -59,8 +60,8 @@ scoped_refptr<DisplayItemList> DisplayItemList::CreateFromProto(
for (int i = 0; i < proto.items_size(); i++) {
const proto::DisplayItem& item_proto = proto.items(i);
- DisplayItem* item =
- DisplayItemProtoFactory::AllocateAndConstruct(list, item_proto);
+ DisplayItem* item = DisplayItemProtoFactory::AllocateAndConstruct(
+ layer_rect, list, item_proto);
if (item)
item->FromProtobuf(item_proto);
}
@@ -200,6 +201,15 @@ void DisplayItemList::RemoveLast() {
}
void DisplayItemList::Finalize() {
+ // TODO(wkorman): Uncomment the assert below once we've investigated
vmpstr 2015/11/17 21:15:13 These two TODOs seem to be a bit contradictory. I
wkorman 2015/11/17 21:49:47 Yes, the first TODO will either be resolved or we
+ // and resolved issues.
+ // DCHECK_EQ(items_.size(), visual_rects_.size());
+
+ // TODO(vmpstr): Build and make use of an RTree from the visual
+ // rects. For now we just clear them out since we won't ever need
+ // them to stick around post-Finalize.
+ visual_rects_.clear();
+
ProcessAppendedItems();
if (settings_.use_cached_picture) {

Powered by Google App Engine
This is Rietveld 408576698