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

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: Fix cc unit tests. 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..5c6fed012d01f6aa47da07a95e611b5911e0b14b 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,12 @@ void DisplayItemList::RemoveLast() {
}
void DisplayItemList::Finalize() {
+ // TODO(vmpstr): Build and make use of an RTree from the visual
danakj 2015/11/05 23:54:27 put the TODO on the clear()
wkorman 2015/11/17 01:47:23 Done.
+ // rects. For now we just clear them out since we won't ever need
+ // them to stick around post-Finalize.
+ DCHECK(items_.size() == visual_rects_.size());
danakj 2015/11/05 23:54:27 DCHECK_EQ
wkorman 2015/11/17 01:47:23 Done, also commented out with a TODO(wkorman) so w
+ visual_rects_.clear();
+
ProcessAppendedItems();
if (settings_.use_cached_picture) {

Powered by Google App Engine
This is Rietveld 408576698