Index: cc/surfaces/surfaces_pixeltest.cc |
diff --git a/cc/surfaces/surfaces_pixeltest.cc b/cc/surfaces/surfaces_pixeltest.cc |
index 178b8e587cf4270fa48118ea12e6420b98b46fd3..f700a111eac5af5184e38f2f1b70fe1a6b5a4acf 100644 |
--- a/cc/surfaces/surfaces_pixeltest.cc |
+++ b/cc/surfaces/surfaces_pixeltest.cc |
@@ -31,9 +31,7 @@ class EmptySurfaceFactoryClient : public SurfaceFactoryClient { |
class SurfacesPixelTest : public RendererPixelTest<GLRenderer> { |
public: |
- SurfacesPixelTest() |
- : allocator_(kArbitraryFrameSinkId), |
- factory_(kArbitraryFrameSinkId, &manager_, &client_) {} |
+ SurfacesPixelTest() : factory_(kArbitraryFrameSinkId, &manager_, &client_) {} |
protected: |
SurfaceManager manager_; |
@@ -84,14 +82,15 @@ TEST_F(SurfacesPixelTest, DrawSimpleFrame) { |
CompositorFrame root_frame; |
root_frame.delegated_frame_data = std::move(delegated_frame_data); |
- SurfaceId root_surface_id = allocator_.GenerateId(); |
- factory_.Create(root_surface_id); |
- factory_.SubmitCompositorFrame(root_surface_id, std::move(root_frame), |
+ LocalFrameId root_local_frame_id = allocator_.GenerateId(); |
+ SurfaceId root_surface_id(factory_.frame_sink_id(), root_local_frame_id); |
+ factory_.Create(root_local_frame_id); |
+ factory_.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame), |
SurfaceFactory::DrawCallback()); |
SurfaceAggregator aggregator(&manager_, resource_provider_.get(), true); |
CompositorFrame aggregated_frame = aggregator.Aggregate(root_surface_id); |
- factory_.Destroy(root_surface_id); |
+ factory_.Destroy(root_local_frame_id); |
bool discard_alpha = false; |
ExactPixelComparator pixel_comparator(discard_alpha); |
@@ -105,10 +104,13 @@ TEST_F(SurfacesPixelTest, DrawSimpleFrame) { |
// Draws a frame with simple surface embedding. |
TEST_F(SurfacesPixelTest, DrawSimpleAggregatedFrame) { |
gfx::Size child_size(200, 100); |
- SurfaceId child_surface_id = allocator_.GenerateId(); |
- SurfaceId root_surface_id = allocator_.GenerateId(); |
- factory_.Create(child_surface_id); |
- factory_.Create(root_surface_id); |
+ LocalFrameId child_local_frame_id = allocator_.GenerateId(); |
+ SurfaceId child_surface_id(factory_.frame_sink_id(), child_local_frame_id); |
+ LocalFrameId root_local_frame_id = allocator_.GenerateId(); |
+ SurfaceId root_surface_id(factory_.frame_sink_id(), root_local_frame_id); |
+ |
+ factory_.Create(child_local_frame_id); |
+ factory_.Create(root_local_frame_id); |
{ |
gfx::Rect rect(device_viewport_size_); |
RenderPassId id(1, 1); |
@@ -141,7 +143,7 @@ TEST_F(SurfacesPixelTest, DrawSimpleAggregatedFrame) { |
CompositorFrame root_frame; |
root_frame.delegated_frame_data = std::move(delegated_frame_data); |
- factory_.SubmitCompositorFrame(root_surface_id, std::move(root_frame), |
+ factory_.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame), |
SurfaceFactory::DrawCallback()); |
} |
@@ -170,7 +172,7 @@ TEST_F(SurfacesPixelTest, DrawSimpleAggregatedFrame) { |
CompositorFrame child_frame; |
child_frame.delegated_frame_data = std::move(delegated_frame_data); |
- factory_.SubmitCompositorFrame(child_surface_id, std::move(child_frame), |
+ factory_.SubmitCompositorFrame(child_local_frame_id, std::move(child_frame), |
SurfaceFactory::DrawCallback()); |
} |
@@ -184,8 +186,8 @@ TEST_F(SurfacesPixelTest, DrawSimpleAggregatedFrame) { |
EXPECT_TRUE(RunPixelTest(pass_list, |
base::FilePath(FILE_PATH_LITERAL("blue_yellow.png")), |
pixel_comparator)); |
- factory_.Destroy(root_surface_id); |
- factory_.Destroy(child_surface_id); |
+ factory_.Destroy(root_local_frame_id); |
+ factory_.Destroy(child_local_frame_id); |
} |
// Tests a surface quad that has a non-identity transform into its pass. |
@@ -199,12 +201,15 @@ TEST_F(SurfacesPixelTest, DrawAggregatedFrameWithSurfaceTransforms) { |
// bottom_blue_quad (100x100 @ 0x100) |
// right_child -> top_blue_quad (100x100 @ 0x0), |
// bottom_green_quad (100x100 @ 0x100) |
- SurfaceId left_child_id = allocator_.GenerateId(); |
- SurfaceId right_child_id = allocator_.GenerateId(); |
- SurfaceId root_surface_id = allocator_.GenerateId(); |
- factory_.Create(left_child_id); |
- factory_.Create(right_child_id); |
- factory_.Create(root_surface_id); |
+ LocalFrameId left_child_local_id = allocator_.GenerateId(); |
+ SurfaceId left_child_id(factory_.frame_sink_id(), left_child_local_id); |
+ LocalFrameId right_child_local_id = allocator_.GenerateId(); |
+ SurfaceId right_child_id(factory_.frame_sink_id(), right_child_local_id); |
+ LocalFrameId root_local_frame_id = allocator_.GenerateId(); |
+ SurfaceId root_surface_id(factory_.frame_sink_id(), root_local_frame_id); |
+ factory_.Create(left_child_local_id); |
+ factory_.Create(right_child_local_id); |
+ factory_.Create(root_local_frame_id); |
{ |
gfx::Rect rect(device_viewport_size_); |
@@ -241,7 +246,7 @@ TEST_F(SurfacesPixelTest, DrawAggregatedFrameWithSurfaceTransforms) { |
CompositorFrame root_frame; |
root_frame.delegated_frame_data = std::move(delegated_frame_data); |
- factory_.SubmitCompositorFrame(root_surface_id, std::move(root_frame), |
+ factory_.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame), |
SurfaceFactory::DrawCallback()); |
} |
@@ -278,7 +283,7 @@ TEST_F(SurfacesPixelTest, DrawAggregatedFrameWithSurfaceTransforms) { |
CompositorFrame child_frame; |
child_frame.delegated_frame_data = std::move(delegated_frame_data); |
- factory_.SubmitCompositorFrame(left_child_id, std::move(child_frame), |
+ factory_.SubmitCompositorFrame(left_child_local_id, std::move(child_frame), |
SurfaceFactory::DrawCallback()); |
} |
@@ -315,7 +320,7 @@ TEST_F(SurfacesPixelTest, DrawAggregatedFrameWithSurfaceTransforms) { |
CompositorFrame child_frame; |
child_frame.delegated_frame_data = std::move(delegated_frame_data); |
- factory_.SubmitCompositorFrame(right_child_id, std::move(child_frame), |
+ factory_.SubmitCompositorFrame(right_child_local_id, std::move(child_frame), |
SurfaceFactory::DrawCallback()); |
} |
@@ -331,9 +336,9 @@ TEST_F(SurfacesPixelTest, DrawAggregatedFrameWithSurfaceTransforms) { |
base::FilePath(FILE_PATH_LITERAL("four_blue_green_checkers.png")), |
pixel_comparator)); |
- factory_.Destroy(root_surface_id); |
- factory_.Destroy(left_child_id); |
- factory_.Destroy(right_child_id); |
+ factory_.Destroy(root_local_frame_id); |
+ factory_.Destroy(left_child_local_id); |
+ factory_.Destroy(right_child_local_id); |
} |
} // namespace |