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

Unified Diff: cc/surfaces/surface_hittest_unittest.cc

Issue 2103333002: Revert of Make cc::CompositorFrames movable [Part 2 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « cc/surfaces/surface_hittest.cc ('k') | cc/surfaces/surfaces_pixeltest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_hittest_unittest.cc
diff --git a/cc/surfaces/surface_hittest_unittest.cc b/cc/surfaces/surface_hittest_unittest.cc
index 6f0637f41a485048040e4338c47a78215daafe4d..59adb8fa7513a58ff1ccf1d818155223163c814a 100644
--- a/cc/surfaces/surface_hittest_unittest.cc
+++ b/cc/surfaces/surface_hittest_unittest.cc
@@ -81,7 +81,9 @@
SurfaceIdAllocator root_allocator(2);
SurfaceId root_surface_id = root_allocator.GenerateId();
factory.Create(root_surface_id);
- factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame),
+ std::unique_ptr<CompositorFrame> root_frame_copy(new CompositorFrame);
+ *root_frame_copy = std::move(root_frame);
+ factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame_copy),
SurfaceFactory::DrawCallback());
{
@@ -110,7 +112,9 @@
SurfaceIdAllocator root_allocator(2);
SurfaceId root_surface_id = root_allocator.GenerateId();
factory.Create(root_surface_id);
- factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame),
+ std::unique_ptr<CompositorFrame> root_frame_copy(new CompositorFrame);
+ *root_frame_copy = std::move(root_frame);
+ factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame_copy),
SurfaceFactory::DrawCallback());
TestCase tests[] = {
{
@@ -153,7 +157,9 @@
SurfaceIdAllocator root_allocator(2);
SurfaceId root_surface_id = root_allocator.GenerateId();
factory.Create(root_surface_id);
- factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame),
+ std::unique_ptr<CompositorFrame> root_frame_copy(new CompositorFrame);
+ *root_frame_copy = std::move(root_frame);
+ factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame_copy),
SurfaceFactory::DrawCallback());
// Creates a child surface.
@@ -172,7 +178,9 @@
// Submit the frame.
factory.Create(child_surface_id);
- factory.SubmitCompositorFrame(child_surface_id, std::move(child_frame),
+ std::unique_ptr<CompositorFrame> child_frame_copy(new CompositorFrame);
+ *child_frame_copy = std::move(child_frame);
+ factory.SubmitCompositorFrame(child_surface_id, std::move(child_frame_copy),
SurfaceFactory::DrawCallback());
TestCase tests[] = {
@@ -226,7 +234,9 @@
root_rect,
child_rect,
child_surface_id);
- factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame),
+ root_frame_copy.reset(new CompositorFrame);
+ *root_frame_copy = std::move(root_frame);
+ factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame_copy),
SurfaceFactory::DrawCallback());
// Verify that point (100, 100) no longer falls on the child surface.
@@ -291,7 +301,9 @@
SurfaceIdAllocator root_allocator(2);
SurfaceId root_surface_id = root_allocator.GenerateId();
factory.Create(root_surface_id);
- factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame),
+ std::unique_ptr<CompositorFrame> root_frame_copy(new CompositorFrame);
+ *root_frame_copy = std::move(root_frame);
+ factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame_copy),
SurfaceFactory::DrawCallback());
// Creates a child surface.
@@ -310,7 +322,9 @@
// Submit the frame.
factory.Create(child_surface_id);
- factory.SubmitCompositorFrame(child_surface_id, std::move(child_frame),
+ std::unique_ptr<CompositorFrame> child_frame_copy(new CompositorFrame);
+ *child_frame_copy = std::move(child_frame);
+ factory.SubmitCompositorFrame(child_surface_id, std::move(child_frame_copy),
SurfaceFactory::DrawCallback());
TestCase tests[] = {
@@ -409,7 +423,9 @@
SurfaceIdAllocator root_allocator(1);
SurfaceId root_surface_id = root_allocator.GenerateId();
factory.Create(root_surface_id);
- factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame),
+ std::unique_ptr<CompositorFrame> root_frame_copy(new CompositorFrame);
+ *root_frame_copy = std::move(root_frame);
+ factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame_copy),
SurfaceFactory::DrawCallback());
TestCase tests[] = {
@@ -487,7 +503,9 @@
SurfaceIdAllocator root_allocator(2);
SurfaceId root_surface_id = root_allocator.GenerateId();
factory.Create(root_surface_id);
- factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame),
+ std::unique_ptr<CompositorFrame> root_frame_copy(new CompositorFrame);
+ *root_frame_copy = std::move(root_frame);
+ factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame_copy),
SurfaceFactory::DrawCallback());
// Creates a child surface.
@@ -504,7 +522,9 @@
// Submit the frame.
factory.Create(child_surface_id);
- factory.SubmitCompositorFrame(child_surface_id, std::move(child_frame),
+ std::unique_ptr<CompositorFrame> frame_copy(new CompositorFrame);
+ *frame_copy = std::move(child_frame);
+ factory.SubmitCompositorFrame(child_surface_id, std::move(frame_copy),
SurfaceFactory::DrawCallback());
TestCase test_expectations_without_insets[] = {
« no previous file with comments | « cc/surfaces/surface_hittest.cc ('k') | cc/surfaces/surfaces_pixeltest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698