Index: cc/surfaces/surface_aggregator_unittest.cc |
diff --git a/cc/surfaces/surface_aggregator_unittest.cc b/cc/surfaces/surface_aggregator_unittest.cc |
index 2ce40f14332da261bbd5adcaf6c1883e6d758c55..a32e35cdb477ca52d6aed2f5f955a76c33b1fed9 100644 |
--- a/cc/surfaces/surface_aggregator_unittest.cc |
+++ b/cc/surfaces/surface_aggregator_unittest.cc |
@@ -143,7 +143,7 @@ class SurfaceAggregatorValidSurfaceTest : public SurfaceAggregatorTest { |
std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData); |
pass_list->swap(frame_data->render_pass_list); |
- std::unique_ptr<CompositorFrame> frame(new CompositorFrame); |
+ std::unique_ptr<CompositorFrame> frame(CompositorFrame::Create()); |
frame->delegated_frame_data = std::move(frame_data); |
factory_.SubmitCompositorFrame(surface_id, std::move(frame), |
@@ -164,7 +164,7 @@ class SurfaceAggregatorValidSurfaceTest : public SurfaceAggregatorTest { |
new DelegatedFrameData); |
delegated_frame_data->render_pass_list.push_back(std::move(pass)); |
- std::unique_ptr<CompositorFrame> child_frame(new CompositorFrame); |
+ std::unique_ptr<CompositorFrame> child_frame(CompositorFrame::Create()); |
child_frame->delegated_frame_data = std::move(delegated_frame_data); |
factory_.SubmitCompositorFrame(surface_id, std::move(child_frame), |
@@ -381,7 +381,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, RootCopyRequest) { |
std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData); |
pass_list.swap(frame_data->render_pass_list); |
- std::unique_ptr<CompositorFrame> frame(new CompositorFrame); |
+ std::unique_ptr<CompositorFrame> frame(CompositorFrame::Create()); |
frame->delegated_frame_data = std::move(frame_data); |
factory_.SubmitCompositorFrame(root_surface_id_, std::move(frame), |
@@ -465,7 +465,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, UnreferencedSurface) { |
AddPasses(&frame_data->render_pass_list, gfx::Rect(SurfaceSize()), |
parent_passes, arraysize(parent_passes)); |
- std::unique_ptr<CompositorFrame> frame(new CompositorFrame); |
+ std::unique_ptr<CompositorFrame> frame(CompositorFrame::Create()); |
frame->delegated_frame_data = std::move(frame_data); |
frame->metadata.referenced_surfaces.push_back(embedded_surface_id); |
@@ -482,7 +482,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, UnreferencedSurface) { |
AddPasses(&frame_data->render_pass_list, gfx::Rect(SurfaceSize()), |
root_passes, arraysize(root_passes)); |
- std::unique_ptr<CompositorFrame> frame(new CompositorFrame); |
+ std::unique_ptr<CompositorFrame> frame(CompositorFrame::Create()); |
frame->delegated_frame_data = std::move(frame_data); |
frame->metadata.referenced_surfaces.push_back(parent_surface_id); |
// Reference to Surface ID of a Surface that doesn't exist should be |
@@ -1041,7 +1041,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateMultiplePassWithTransform) { |
new DelegatedFrameData); |
child_pass_list.swap(child_frame_data->render_pass_list); |
- std::unique_ptr<CompositorFrame> child_frame(new CompositorFrame); |
+ std::unique_ptr<CompositorFrame> child_frame(CompositorFrame::Create()); |
child_frame->delegated_frame_data = std::move(child_frame_data); |
factory_.SubmitCompositorFrame(child_surface_id, std::move(child_frame), |
@@ -1073,7 +1073,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateMultiplePassWithTransform) { |
new DelegatedFrameData); |
middle_pass_list.swap(middle_frame_data->render_pass_list); |
- std::unique_ptr<CompositorFrame> middle_frame(new CompositorFrame); |
+ std::unique_ptr<CompositorFrame> middle_frame(CompositorFrame::Create()); |
middle_frame->delegated_frame_data = std::move(middle_frame_data); |
factory_.SubmitCompositorFrame(middle_surface_id, std::move(middle_frame), |
@@ -1109,7 +1109,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateMultiplePassWithTransform) { |
std::unique_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData); |
root_pass_list.swap(root_frame_data->render_pass_list); |
- std::unique_ptr<CompositorFrame> root_frame(new CompositorFrame); |
+ std::unique_ptr<CompositorFrame> root_frame(CompositorFrame::Create()); |
root_frame->delegated_frame_data = std::move(root_frame_data); |
factory_.SubmitCompositorFrame(root_surface_id_, std::move(root_frame), |
@@ -1216,7 +1216,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateDamageRect) { |
std::unique_ptr<DelegatedFrameData> child_frame_data(new DelegatedFrameData); |
child_pass_list.swap(child_frame_data->render_pass_list); |
- std::unique_ptr<CompositorFrame> child_frame(new CompositorFrame); |
+ std::unique_ptr<CompositorFrame> child_frame(CompositorFrame::Create()); |
child_frame->delegated_frame_data = std::move(child_frame_data); |
SurfaceId child_surface_id = allocator_.GenerateId(); |
@@ -1242,7 +1242,8 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateDamageRect) { |
new DelegatedFrameData); |
parent_surface_pass_list.swap(parent_surface_frame_data->render_pass_list); |
- std::unique_ptr<CompositorFrame> parent_surface_frame(new CompositorFrame); |
+ std::unique_ptr<CompositorFrame> parent_surface_frame( |
+ CompositorFrame::Create()); |
parent_surface_frame->delegated_frame_data = |
std::move(parent_surface_frame_data); |
@@ -1278,7 +1279,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateDamageRect) { |
std::unique_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData); |
root_pass_list.swap(root_frame_data->render_pass_list); |
- std::unique_ptr<CompositorFrame> root_frame(new CompositorFrame); |
+ std::unique_ptr<CompositorFrame> root_frame(CompositorFrame::Create()); |
root_frame->delegated_frame_data = std::move(root_frame_data); |
factory_.SubmitCompositorFrame(root_surface_id_, std::move(root_frame), |
@@ -1316,7 +1317,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateDamageRect) { |
new DelegatedFrameData); |
child_pass_list.swap(child_frame_data->render_pass_list); |
- std::unique_ptr<CompositorFrame> child_frame(new CompositorFrame); |
+ std::unique_ptr<CompositorFrame> child_frame(CompositorFrame::Create()); |
child_frame->delegated_frame_data = std::move(child_frame_data); |
factory_.SubmitCompositorFrame(child_surface_id, std::move(child_frame), |
@@ -1356,7 +1357,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateDamageRect) { |
std::unique_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData); |
root_pass_list.swap(root_frame_data->render_pass_list); |
- std::unique_ptr<CompositorFrame> root_frame(new CompositorFrame); |
+ std::unique_ptr<CompositorFrame> root_frame(CompositorFrame::Create()); |
root_frame->delegated_frame_data = std::move(root_frame_data); |
factory_.SubmitCompositorFrame(root_surface_id_, std::move(root_frame), |
@@ -1378,7 +1379,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateDamageRect) { |
std::unique_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData); |
root_pass_list.swap(root_frame_data->render_pass_list); |
- std::unique_ptr<CompositorFrame> root_frame(new CompositorFrame); |
+ std::unique_ptr<CompositorFrame> root_frame(CompositorFrame::Create()); |
root_frame->delegated_frame_data = std::move(root_frame_data); |
factory_.SubmitCompositorFrame(root_surface_id_, std::move(root_frame), |
@@ -1463,7 +1464,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, SwitchSurfaceDamage) { |
std::unique_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData); |
root_pass_list.swap(root_frame_data->render_pass_list); |
- std::unique_ptr<CompositorFrame> root_frame(new CompositorFrame); |
+ std::unique_ptr<CompositorFrame> root_frame(CompositorFrame::Create()); |
root_frame->delegated_frame_data = std::move(root_frame_data); |
factory_.SubmitCompositorFrame(root_surface_id_, std::move(root_frame), |
@@ -1505,7 +1506,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, SwitchSurfaceDamage) { |
std::unique_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData); |
root_pass_list.swap(root_frame_data->render_pass_list); |
- std::unique_ptr<CompositorFrame> root_frame(new CompositorFrame); |
+ std::unique_ptr<CompositorFrame> root_frame(CompositorFrame::Create()); |
root_frame->delegated_frame_data = std::move(root_frame_data); |
factory_.Create(second_root_surface_id); |
@@ -1951,7 +1952,7 @@ void SubmitCompositorFrameWithResources(ResourceId* resource_ids, |
nearest_neighbor, secure_output_only); |
} |
frame_data->render_pass_list.push_back(std::move(pass)); |
- std::unique_ptr<CompositorFrame> frame(new CompositorFrame); |
+ std::unique_ptr<CompositorFrame> frame(CompositorFrame::Create()); |
frame->delegated_frame_data = std::move(frame_data); |
factory->SubmitCompositorFrame(surface_id, std::move(frame), |
SurfaceFactory::DrawCallback()); |
@@ -2003,7 +2004,7 @@ TEST_F(SurfaceAggregatorWithResourcesTest, TakeInvalidResources) { |
resource.is_software = false; |
frame_data->resource_list.push_back(resource); |
frame_data->render_pass_list.push_back(std::move(pass)); |
- std::unique_ptr<CompositorFrame> frame(new CompositorFrame); |
+ std::unique_ptr<CompositorFrame> frame(CompositorFrame::Create()); |
frame->delegated_frame_data = std::move(frame_data); |
factory.SubmitCompositorFrame(surface_id, std::move(frame), |
SurfaceFactory::DrawCallback()); |
@@ -2144,7 +2145,7 @@ TEST_F(SurfaceAggregatorWithResourcesTest, SecureOutputTexture) { |
pass->copy_requests.push_back(CopyOutputRequest::CreateEmptyRequest()); |
frame_data->render_pass_list.push_back(std::move(pass)); |
- std::unique_ptr<CompositorFrame> frame(new CompositorFrame); |
+ std::unique_ptr<CompositorFrame> frame(CompositorFrame::Create()); |
frame->delegated_frame_data = std::move(frame_data); |
factory.SubmitCompositorFrame(surface2_id, std::move(frame), |
SurfaceFactory::DrawCallback()); |