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..c421cade49a5f6f3d7d16b013e12dc69a5ee1ac4 100644 |
--- a/cc/surfaces/surface_hittest_unittest.cc |
+++ b/cc/surfaces/surface_hittest_unittest.cc |
@@ -20,6 +20,8 @@ namespace cc { |
namespace { |
+static constexpr uint32_t kArbitraryGpuId = 0; |
+ |
struct TestCase { |
SurfaceId input_surface_id; |
gfx::Point input_point; |
@@ -69,7 +71,7 @@ TEST(SurfaceHittestTest, Hittest_BadCompositorFrameDoesNotCrash) { |
CompositorFrame root_frame = CreateCompositorFrame(root_rect, &root_pass); |
// Add a reference to a non-existant child surface on the root surface. |
- SurfaceId child_surface_id(3, 0xdeadbeef, 0); |
+ SurfaceId child_surface_id(kArbitraryGpuId, 3, 0xdeadbeef, 0); |
gfx::Rect child_rect(200, 200); |
CreateSurfaceDrawQuad(root_pass, |
gfx::Transform(), |
@@ -78,7 +80,7 @@ TEST(SurfaceHittestTest, Hittest_BadCompositorFrameDoesNotCrash) { |
child_surface_id); |
// Submit the root frame. |
- SurfaceIdAllocator root_allocator(2); |
+ SurfaceIdAllocator root_allocator(kArbitraryGpuId, 2); |
SurfaceId root_surface_id = root_allocator.GenerateId(); |
factory.Create(root_surface_id); |
factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame), |
@@ -107,7 +109,7 @@ TEST(SurfaceHittestTest, Hittest_SingleSurface) { |
CompositorFrame root_frame = CreateCompositorFrame(root_rect, &root_pass); |
// Submit the root frame. |
- SurfaceIdAllocator root_allocator(2); |
+ SurfaceIdAllocator root_allocator(kArbitraryGpuId, 2); |
SurfaceId root_surface_id = root_allocator.GenerateId(); |
factory.Create(root_surface_id); |
factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame), |
@@ -137,7 +139,7 @@ TEST(SurfaceHittestTest, Hittest_ChildSurface) { |
CompositorFrame root_frame = CreateCompositorFrame(root_rect, &root_pass); |
// Add a reference to the child surface on the root surface. |
- SurfaceIdAllocator child_allocator(3); |
+ SurfaceIdAllocator child_allocator(kArbitraryGpuId, 3); |
SurfaceId child_surface_id = child_allocator.GenerateId(); |
gfx::Rect child_rect(200, 200); |
CreateSurfaceDrawQuad(root_pass, |
@@ -150,7 +152,7 @@ TEST(SurfaceHittestTest, Hittest_ChildSurface) { |
child_surface_id); |
// Submit the root frame. |
- SurfaceIdAllocator root_allocator(2); |
+ SurfaceIdAllocator root_allocator(kArbitraryGpuId, 2); |
SurfaceId root_surface_id = root_allocator.GenerateId(); |
factory.Create(root_surface_id); |
factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame), |
@@ -275,7 +277,7 @@ TEST(SurfaceHittestTest, Hittest_InvalidRenderPassDrawQuad) { |
RenderPassId(1337, 1337)); |
// Add a reference to the child surface on the root surface. |
- SurfaceIdAllocator child_allocator(3); |
+ SurfaceIdAllocator child_allocator(kArbitraryGpuId, 3); |
SurfaceId child_surface_id = child_allocator.GenerateId(); |
gfx::Rect child_rect(200, 200); |
CreateSurfaceDrawQuad(root_pass, |
@@ -288,7 +290,7 @@ TEST(SurfaceHittestTest, Hittest_InvalidRenderPassDrawQuad) { |
child_surface_id); |
// Submit the root frame. |
- SurfaceIdAllocator root_allocator(2); |
+ SurfaceIdAllocator root_allocator(kArbitraryGpuId, 2); |
SurfaceId root_surface_id = root_allocator.GenerateId(); |
factory.Create(root_surface_id); |
factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame), |
@@ -406,7 +408,7 @@ TEST(SurfaceHittestTest, Hittest_RenderPassDrawQuad) { |
child_solid_quad_rect); |
// Submit the root frame. |
- SurfaceIdAllocator root_allocator(1); |
+ SurfaceIdAllocator root_allocator(kArbitraryGpuId, 1); |
SurfaceId root_surface_id = root_allocator.GenerateId(); |
factory.Create(root_surface_id); |
factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame), |
@@ -472,7 +474,7 @@ TEST(SurfaceHittestTest, Hittest_SingleSurface_WithInsetsDelegate) { |
CompositorFrame root_frame = CreateCompositorFrame(root_rect, &root_pass); |
// Add a reference to the child surface on the root surface. |
- SurfaceIdAllocator child_allocator(3); |
+ SurfaceIdAllocator child_allocator(kArbitraryGpuId, 3); |
SurfaceId child_surface_id = child_allocator.GenerateId(); |
gfx::Rect child_rect(200, 200); |
CreateSurfaceDrawQuad( |
@@ -484,7 +486,7 @@ TEST(SurfaceHittestTest, Hittest_SingleSurface_WithInsetsDelegate) { |
root_rect, child_rect, child_surface_id); |
// Submit the root frame. |
- SurfaceIdAllocator root_allocator(2); |
+ SurfaceIdAllocator root_allocator(kArbitraryGpuId, 2); |
SurfaceId root_surface_id = root_allocator.GenerateId(); |
factory.Create(root_surface_id); |
factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame), |