| Index: cc/surfaces/surface_hittest_unittest.cc
|
| diff --git a/cc/surfaces/surface_hittest_unittest.cc b/cc/surfaces/surface_hittest_unittest.cc
|
| index 2c04b2a731c695e3ea1bb05edcb5599d1115d62b..1acaf06e6db8b2a917246a0fbd871d41466e67fc 100644
|
| --- a/cc/surfaces/surface_hittest_unittest.cc
|
| +++ b/cc/surfaces/surface_hittest_unittest.cc
|
| @@ -86,7 +86,6 @@ TEST(SurfaceHittestTest, Hittest_BadCompositorFrameDoesNotCrash) {
|
| SurfaceIdAllocator root_allocator;
|
| LocalFrameId root_local_frame_id = root_allocator.GenerateId();
|
| SurfaceId root_surface_id(root_frame_sink_id, root_local_frame_id);
|
| - root_factory.Create(root_local_frame_id);
|
| root_factory.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame),
|
| SurfaceFactory::DrawCallback());
|
|
|
| @@ -99,7 +98,7 @@ TEST(SurfaceHittestTest, Hittest_BadCompositorFrameDoesNotCrash) {
|
| root_surface_id, gfx::Point(100, 100), &transform));
|
| }
|
|
|
| - root_factory.Destroy(root_local_frame_id);
|
| + root_factory.EvictSurface();
|
| }
|
|
|
| TEST(SurfaceHittestTest, Hittest_SingleSurface) {
|
| @@ -119,7 +118,6 @@ TEST(SurfaceHittestTest, Hittest_SingleSurface) {
|
| SurfaceIdAllocator root_allocator;
|
| LocalFrameId root_local_frame_id = root_allocator.GenerateId();
|
| SurfaceId root_surface_id(root_frame_sink_id, root_local_frame_id);
|
| - root_factory.Create(root_local_frame_id);
|
| root_factory.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame),
|
| SurfaceFactory::DrawCallback());
|
| TestCase tests[] = {
|
| @@ -133,7 +131,7 @@ TEST(SurfaceHittestTest, Hittest_SingleSurface) {
|
|
|
| RunTests(nullptr, &manager, tests, arraysize(tests));
|
|
|
| - root_factory.Destroy(root_local_frame_id);
|
| + root_factory.EvictSurface();
|
| }
|
|
|
| TEST(SurfaceHittestTest, Hittest_ChildSurface) {
|
| @@ -172,7 +170,6 @@ TEST(SurfaceHittestTest, Hittest_ChildSurface) {
|
| SurfaceIdAllocator root_allocator;
|
| LocalFrameId root_local_frame_id = root_allocator.GenerateId();
|
| SurfaceId root_surface_id(root_frame_sink_id, root_local_frame_id);
|
| - root_factory.Create(root_local_frame_id);
|
| root_factory.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame),
|
| SurfaceFactory::DrawCallback());
|
|
|
| @@ -191,7 +188,6 @@ TEST(SurfaceHittestTest, Hittest_ChildSurface) {
|
| root_rect, child_solid_quad_rect);
|
|
|
| // Submit the frame.
|
| - child_factory.Create(child_local_frame_id);
|
| child_factory.SubmitCompositorFrame(child_local_frame_id,
|
| std::move(child_frame),
|
| SurfaceFactory::DrawCallback());
|
| @@ -272,8 +268,8 @@ TEST(SurfaceHittestTest, Hittest_ChildSurface) {
|
| EXPECT_EQ(gfx::Point(25, 25), point_in_target_space);
|
| }
|
|
|
| - root_factory.Destroy(root_local_frame_id);
|
| - child_factory.Destroy(child_local_frame_id);
|
| + root_factory.EvictSurface();
|
| + child_factory.EvictSurface();
|
| }
|
|
|
| // This test verifies that hit testing will progress to the next quad if it
|
| @@ -321,7 +317,6 @@ TEST(SurfaceHittestTest, Hittest_InvalidRenderPassDrawQuad) {
|
| SurfaceIdAllocator root_allocator;
|
| LocalFrameId root_local_frame_id = root_allocator.GenerateId();
|
| SurfaceId root_surface_id(root_frame_sink_id, root_local_frame_id);
|
| - root_factory.Create(root_local_frame_id);
|
| root_factory.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame),
|
| SurfaceFactory::DrawCallback());
|
|
|
| @@ -340,7 +335,6 @@ TEST(SurfaceHittestTest, Hittest_InvalidRenderPassDrawQuad) {
|
| child_solid_quad_rect);
|
|
|
| // Submit the frame.
|
| - child_factory.Create(child_local_frame_id);
|
| child_factory.SubmitCompositorFrame(child_local_frame_id,
|
| std::move(child_frame),
|
| SurfaceFactory::DrawCallback());
|
| @@ -386,8 +380,8 @@ TEST(SurfaceHittestTest, Hittest_InvalidRenderPassDrawQuad) {
|
|
|
| RunTests(nullptr, &manager, tests, arraysize(tests));
|
|
|
| - root_factory.Destroy(root_local_frame_id);
|
| - child_factory.Destroy(child_local_frame_id);
|
| + root_factory.EvictSurface();
|
| + child_factory.EvictSurface();
|
| }
|
|
|
| TEST(SurfaceHittestTest, Hittest_RenderPassDrawQuad) {
|
| @@ -440,7 +434,6 @@ TEST(SurfaceHittestTest, Hittest_RenderPassDrawQuad) {
|
| SurfaceIdAllocator root_allocator;
|
| LocalFrameId root_local_frame_id = root_allocator.GenerateId();
|
| SurfaceId root_surface_id(root_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());
|
|
|
| @@ -490,7 +483,7 @@ TEST(SurfaceHittestTest, Hittest_RenderPassDrawQuad) {
|
|
|
| RunTests(nullptr, &manager, tests, arraysize(tests));
|
|
|
| - factory.Destroy(root_local_frame_id);
|
| + factory.EvictSurface();
|
| }
|
|
|
| TEST(SurfaceHittestTest, Hittest_SingleSurface_WithInsetsDelegate) {
|
| @@ -528,7 +521,6 @@ TEST(SurfaceHittestTest, Hittest_SingleSurface_WithInsetsDelegate) {
|
| SurfaceIdAllocator root_allocator;
|
| LocalFrameId root_local_frame_id = root_allocator.GenerateId();
|
| SurfaceId root_surface_id(root_frame_sink_id, root_local_frame_id);
|
| - root_factory.Create(root_local_frame_id);
|
| root_factory.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame),
|
| SurfaceFactory::DrawCallback());
|
|
|
| @@ -545,7 +537,6 @@ TEST(SurfaceHittestTest, Hittest_SingleSurface_WithInsetsDelegate) {
|
| root_rect, child_solid_quad_rect);
|
|
|
| // Submit the frame.
|
| - child_factory.Create(child_local_frame_id);
|
| child_factory.SubmitCompositorFrame(child_local_frame_id,
|
| std::move(child_frame),
|
| SurfaceFactory::DrawCallback());
|
| @@ -627,8 +618,8 @@ TEST(SurfaceHittestTest, Hittest_SingleSurface_WithInsetsDelegate) {
|
| EXPECT_EQ(0, accept_delegate.reject_target_overrides());
|
| EXPECT_EQ(2, accept_delegate.accept_target_overrides());
|
|
|
| - root_factory.Destroy(root_local_frame_id);
|
| - child_factory.Destroy(child_local_frame_id);
|
| + root_factory.EvictSurface();
|
| + child_factory.EvictSurface();
|
| }
|
|
|
| } // namespace cc
|
|
|