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[] = { |