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

Unified Diff: cc/surfaces/surfaces_pixeltest.cc

Issue 2098953003: Make cc::CompositorFrames movable [Part 2 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed exo unittests 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_unittest.cc ('k') | cc/test/pixel_test_delegating_output_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surfaces_pixeltest.cc
diff --git a/cc/surfaces/surfaces_pixeltest.cc b/cc/surfaces/surfaces_pixeltest.cc
index 9af4ed93e523955b5d6b0fa0a48624d2eb6c08b9..ae2c9ba4fab6c5fdd46034b12df9ef372bdb0b44 100644
--- a/cc/surfaces/surfaces_pixeltest.cc
+++ b/cc/surfaces/surfaces_pixeltest.cc
@@ -77,8 +77,8 @@ TEST_F(SurfacesPixelTest, DrawSimpleFrame) {
new DelegatedFrameData);
delegated_frame_data->render_pass_list.push_back(std::move(pass));
- std::unique_ptr<CompositorFrame> root_frame(new CompositorFrame);
- root_frame->delegated_frame_data = std::move(delegated_frame_data);
+ CompositorFrame root_frame;
+ root_frame.delegated_frame_data = std::move(delegated_frame_data);
SurfaceId root_surface_id = allocator_.GenerateId();
factory_.Create(root_surface_id);
@@ -86,14 +86,13 @@ TEST_F(SurfacesPixelTest, DrawSimpleFrame) {
SurfaceFactory::DrawCallback());
SurfaceAggregator aggregator(&manager_, resource_provider_.get(), true);
- std::unique_ptr<CompositorFrame> aggregated_frame =
- aggregator.Aggregate(root_surface_id);
+ CompositorFrame aggregated_frame = aggregator.Aggregate(root_surface_id);
factory_.Destroy(root_surface_id);
bool discard_alpha = false;
ExactPixelComparator pixel_comparator(discard_alpha);
RenderPassList* pass_list =
- &aggregated_frame->delegated_frame_data->render_pass_list;
+ &aggregated_frame.delegated_frame_data->render_pass_list;
EXPECT_TRUE(RunPixelTest(pass_list,
base::FilePath(FILE_PATH_LITERAL("green.png")),
pixel_comparator));
@@ -135,8 +134,8 @@ TEST_F(SurfacesPixelTest, DrawSimpleAggregatedFrame) {
new DelegatedFrameData);
delegated_frame_data->render_pass_list.push_back(std::move(pass));
- std::unique_ptr<CompositorFrame> root_frame(new CompositorFrame);
- root_frame->delegated_frame_data = std::move(delegated_frame_data);
+ CompositorFrame root_frame;
+ root_frame.delegated_frame_data = std::move(delegated_frame_data);
factory_.SubmitCompositorFrame(root_surface_id, std::move(root_frame),
SurfaceFactory::DrawCallback());
@@ -164,21 +163,20 @@ TEST_F(SurfacesPixelTest, DrawSimpleAggregatedFrame) {
new DelegatedFrameData);
delegated_frame_data->render_pass_list.push_back(std::move(pass));
- std::unique_ptr<CompositorFrame> child_frame(new CompositorFrame);
- child_frame->delegated_frame_data = std::move(delegated_frame_data);
+ CompositorFrame child_frame;
+ child_frame.delegated_frame_data = std::move(delegated_frame_data);
factory_.SubmitCompositorFrame(child_surface_id, std::move(child_frame),
SurfaceFactory::DrawCallback());
}
SurfaceAggregator aggregator(&manager_, resource_provider_.get(), true);
- std::unique_ptr<CompositorFrame> aggregated_frame =
- aggregator.Aggregate(root_surface_id);
+ CompositorFrame aggregated_frame = aggregator.Aggregate(root_surface_id);
bool discard_alpha = false;
ExactPixelComparator pixel_comparator(discard_alpha);
RenderPassList* pass_list =
- &aggregated_frame->delegated_frame_data->render_pass_list;
+ &aggregated_frame.delegated_frame_data->render_pass_list;
EXPECT_TRUE(RunPixelTest(pass_list,
base::FilePath(FILE_PATH_LITERAL("blue_yellow.png")),
pixel_comparator));
@@ -236,8 +234,8 @@ TEST_F(SurfacesPixelTest, DrawAggregatedFrameWithSurfaceTransforms) {
new DelegatedFrameData);
delegated_frame_data->render_pass_list.push_back(std::move(pass));
- std::unique_ptr<CompositorFrame> root_frame(new CompositorFrame);
- root_frame->delegated_frame_data = std::move(delegated_frame_data);
+ CompositorFrame root_frame;
+ root_frame.delegated_frame_data = std::move(delegated_frame_data);
factory_.SubmitCompositorFrame(root_surface_id, std::move(root_frame),
SurfaceFactory::DrawCallback());
@@ -273,8 +271,8 @@ TEST_F(SurfacesPixelTest, DrawAggregatedFrameWithSurfaceTransforms) {
new DelegatedFrameData);
delegated_frame_data->render_pass_list.push_back(std::move(pass));
- std::unique_ptr<CompositorFrame> child_frame(new CompositorFrame);
- child_frame->delegated_frame_data = std::move(delegated_frame_data);
+ CompositorFrame child_frame;
+ child_frame.delegated_frame_data = std::move(delegated_frame_data);
factory_.SubmitCompositorFrame(left_child_id, std::move(child_frame),
SurfaceFactory::DrawCallback());
@@ -310,21 +308,20 @@ TEST_F(SurfacesPixelTest, DrawAggregatedFrameWithSurfaceTransforms) {
new DelegatedFrameData);
delegated_frame_data->render_pass_list.push_back(std::move(pass));
- std::unique_ptr<CompositorFrame> child_frame(new CompositorFrame);
- child_frame->delegated_frame_data = std::move(delegated_frame_data);
+ CompositorFrame child_frame;
+ child_frame.delegated_frame_data = std::move(delegated_frame_data);
factory_.SubmitCompositorFrame(right_child_id, std::move(child_frame),
SurfaceFactory::DrawCallback());
}
SurfaceAggregator aggregator(&manager_, resource_provider_.get(), true);
- std::unique_ptr<CompositorFrame> aggregated_frame =
- aggregator.Aggregate(root_surface_id);
+ CompositorFrame aggregated_frame = aggregator.Aggregate(root_surface_id);
bool discard_alpha = false;
ExactPixelComparator pixel_comparator(discard_alpha);
RenderPassList* pass_list =
- &aggregated_frame->delegated_frame_data->render_pass_list;
+ &aggregated_frame.delegated_frame_data->render_pass_list;
EXPECT_TRUE(RunPixelTest(
pass_list,
base::FilePath(FILE_PATH_LITERAL("four_blue_green_checkers.png")),
« no previous file with comments | « cc/surfaces/surface_hittest_unittest.cc ('k') | cc/test/pixel_test_delegating_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698