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

Unified Diff: cc/playback/display_item_list_unittest.cc

Issue 1512823002: Serialize DisplayListRecordingSource to protos. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years 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 | « cc/playback/display_item_list.cc ('k') | cc/playback/display_list_recording_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/playback/display_item_list_unittest.cc
diff --git a/cc/playback/display_item_list_unittest.cc b/cc/playback/display_item_list_unittest.cc
index d61a48dc8dc6dadd990dce2a7ae6c83668d7dd59..b56a79d15f370fe83b5db71113413ab8b66f5b35 100644
--- a/cc/playback/display_item_list_unittest.cc
+++ b/cc/playback/display_item_list_unittest.cc
@@ -82,22 +82,8 @@ void ValidateDisplayItemListSerialization(const gfx::Size& layer_size,
scoped_refptr<DisplayItemList> new_list =
DisplayItemList::CreateFromProto(proto);
- // Finalize the DisplayItemLists to perform raster.
- new_list->Finalize();
-
- const int pixel_size = 4 * layer_size.GetArea();
-
- // Get the rendered contents of the old DisplayItemList.
- scoped_ptr<unsigned char[]> pixels(new unsigned char[pixel_size]);
- memset(pixels.get(), 0, pixel_size);
- DrawDisplayList(pixels.get(), gfx::Rect(layer_size), list);
-
- // Get the rendered contents of the new DisplayItemList.
- scoped_ptr<unsigned char[]> new_pixels(new unsigned char[pixel_size]);
- memset(new_pixels.get(), 0, pixel_size);
- DrawDisplayList(new_pixels.get(), gfx::Rect(layer_size), new_list);
-
- EXPECT_EQ(0, memcmp(pixels.get(), new_pixels.get(), pixel_size));
+ EXPECT_TRUE(
+ AreDisplayListDrawingResultsSame(gfx::Rect(layer_size), list, new_list));
}
} // namespace
« no previous file with comments | « cc/playback/display_item_list.cc ('k') | cc/playback/display_list_recording_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698