OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include "cc/output/compositor_frame.h" | 7 #include "cc/output/compositor_frame.h" |
8 #include "cc/surfaces/surface.h" | 8 #include "cc/surfaces/surface.h" |
9 #include "cc/surfaces/surface_factory.h" | 9 #include "cc/surfaces/surface_factory.h" |
10 #include "cc/surfaces/surface_factory_client.h" | 10 #include "cc/surfaces/surface_factory_client.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 CreateSurfaceDrawQuad(root_pass, | 79 CreateSurfaceDrawQuad(root_pass, |
80 gfx::Transform(), | 80 gfx::Transform(), |
81 root_rect, | 81 root_rect, |
82 child_rect, | 82 child_rect, |
83 child_surface_id); | 83 child_surface_id); |
84 | 84 |
85 // Submit the root frame. | 85 // Submit the root frame. |
86 SurfaceIdAllocator root_allocator; | 86 SurfaceIdAllocator root_allocator; |
87 LocalFrameId root_local_frame_id = root_allocator.GenerateId(); | 87 LocalFrameId root_local_frame_id = root_allocator.GenerateId(); |
88 SurfaceId root_surface_id(root_frame_sink_id, root_local_frame_id); | 88 SurfaceId root_surface_id(root_frame_sink_id, root_local_frame_id); |
89 root_factory.Create(root_local_frame_id); | |
90 root_factory.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame), | 89 root_factory.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame), |
91 SurfaceFactory::DrawCallback()); | 90 SurfaceFactory::DrawCallback()); |
92 | 91 |
93 { | 92 { |
94 SurfaceHittest hittest(nullptr, &manager); | 93 SurfaceHittest hittest(nullptr, &manager); |
95 // It is expected this test will complete without crashes. | 94 // It is expected this test will complete without crashes. |
96 gfx::Transform transform; | 95 gfx::Transform transform; |
97 EXPECT_EQ(root_surface_id, | 96 EXPECT_EQ(root_surface_id, |
98 hittest.GetTargetSurfaceAtPoint( | 97 hittest.GetTargetSurfaceAtPoint( |
99 root_surface_id, gfx::Point(100, 100), &transform)); | 98 root_surface_id, gfx::Point(100, 100), &transform)); |
100 } | 99 } |
101 | 100 |
102 root_factory.Destroy(root_local_frame_id); | 101 root_factory.EvictSurface(); |
103 } | 102 } |
104 | 103 |
105 TEST(SurfaceHittestTest, Hittest_SingleSurface) { | 104 TEST(SurfaceHittestTest, Hittest_SingleSurface) { |
106 SurfaceManager manager; | 105 SurfaceManager manager; |
107 | 106 |
108 // Set up root FrameSink. | 107 // Set up root FrameSink. |
109 EmptySurfaceFactoryClient root_client; | 108 EmptySurfaceFactoryClient root_client; |
110 FrameSinkId root_frame_sink_id(1, 1); | 109 FrameSinkId root_frame_sink_id(1, 1); |
111 SurfaceFactory root_factory(root_frame_sink_id, &manager, &root_client); | 110 SurfaceFactory root_factory(root_frame_sink_id, &manager, &root_client); |
112 | 111 |
113 // Creates a root surface. | 112 // Creates a root surface. |
114 gfx::Rect root_rect(300, 300); | 113 gfx::Rect root_rect(300, 300); |
115 RenderPass* root_pass = nullptr; | 114 RenderPass* root_pass = nullptr; |
116 CompositorFrame root_frame = CreateCompositorFrame(root_rect, &root_pass); | 115 CompositorFrame root_frame = CreateCompositorFrame(root_rect, &root_pass); |
117 | 116 |
118 // Submit the root frame. | 117 // Submit the root frame. |
119 SurfaceIdAllocator root_allocator; | 118 SurfaceIdAllocator root_allocator; |
120 LocalFrameId root_local_frame_id = root_allocator.GenerateId(); | 119 LocalFrameId root_local_frame_id = root_allocator.GenerateId(); |
121 SurfaceId root_surface_id(root_frame_sink_id, root_local_frame_id); | 120 SurfaceId root_surface_id(root_frame_sink_id, root_local_frame_id); |
122 root_factory.Create(root_local_frame_id); | |
123 root_factory.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame), | 121 root_factory.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame), |
124 SurfaceFactory::DrawCallback()); | 122 SurfaceFactory::DrawCallback()); |
125 TestCase tests[] = { | 123 TestCase tests[] = { |
126 { | 124 { |
127 root_surface_id, | 125 root_surface_id, |
128 gfx::Point(100, 100), | 126 gfx::Point(100, 100), |
129 root_surface_id, | 127 root_surface_id, |
130 gfx::Point(100, 100) | 128 gfx::Point(100, 100) |
131 }, | 129 }, |
132 }; | 130 }; |
133 | 131 |
134 RunTests(nullptr, &manager, tests, arraysize(tests)); | 132 RunTests(nullptr, &manager, tests, arraysize(tests)); |
135 | 133 |
136 root_factory.Destroy(root_local_frame_id); | 134 root_factory.EvictSurface(); |
137 } | 135 } |
138 | 136 |
139 TEST(SurfaceHittestTest, Hittest_ChildSurface) { | 137 TEST(SurfaceHittestTest, Hittest_ChildSurface) { |
140 SurfaceManager manager; | 138 SurfaceManager manager; |
141 | 139 |
142 // Set up root FrameSink. | 140 // Set up root FrameSink. |
143 EmptySurfaceFactoryClient root_client; | 141 EmptySurfaceFactoryClient root_client; |
144 FrameSinkId root_frame_sink_id(1, 1); | 142 FrameSinkId root_frame_sink_id(1, 1); |
145 SurfaceFactory root_factory(root_frame_sink_id, &manager, &root_client); | 143 SurfaceFactory root_factory(root_frame_sink_id, &manager, &root_client); |
146 | 144 |
(...skipping 18 matching lines...) Expand all Loading... |
165 0.0f, 0.0f, 1.0f, 0.0f, | 163 0.0f, 0.0f, 1.0f, 0.0f, |
166 0.0f, 0.0f, 0.0f, 1.0f), | 164 0.0f, 0.0f, 0.0f, 1.0f), |
167 root_rect, | 165 root_rect, |
168 child_rect, | 166 child_rect, |
169 child_surface_id); | 167 child_surface_id); |
170 | 168 |
171 // Submit the root frame. | 169 // Submit the root frame. |
172 SurfaceIdAllocator root_allocator; | 170 SurfaceIdAllocator root_allocator; |
173 LocalFrameId root_local_frame_id = root_allocator.GenerateId(); | 171 LocalFrameId root_local_frame_id = root_allocator.GenerateId(); |
174 SurfaceId root_surface_id(root_frame_sink_id, root_local_frame_id); | 172 SurfaceId root_surface_id(root_frame_sink_id, root_local_frame_id); |
175 root_factory.Create(root_local_frame_id); | |
176 root_factory.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame), | 173 root_factory.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame), |
177 SurfaceFactory::DrawCallback()); | 174 SurfaceFactory::DrawCallback()); |
178 | 175 |
179 // Creates a child surface. | 176 // Creates a child surface. |
180 RenderPass* child_pass = nullptr; | 177 RenderPass* child_pass = nullptr; |
181 CompositorFrame child_frame = CreateCompositorFrame(child_rect, &child_pass); | 178 CompositorFrame child_frame = CreateCompositorFrame(child_rect, &child_pass); |
182 | 179 |
183 // Add a solid quad in the child surface. | 180 // Add a solid quad in the child surface. |
184 gfx::Rect child_solid_quad_rect(100, 100); | 181 gfx::Rect child_solid_quad_rect(100, 100); |
185 CreateSolidColorDrawQuad( | 182 CreateSolidColorDrawQuad( |
186 child_pass, | 183 child_pass, |
187 gfx::Transform(1.0f, 0.0f, 0.0f, 50.0f, | 184 gfx::Transform(1.0f, 0.0f, 0.0f, 50.0f, |
188 0.0f, 1.0f, 0.0f, 50.0f, | 185 0.0f, 1.0f, 0.0f, 50.0f, |
189 0.0f, 0.0f, 1.0f, 0.0f, | 186 0.0f, 0.0f, 1.0f, 0.0f, |
190 0.0f, 0.0f, 0.0f, 1.0f), | 187 0.0f, 0.0f, 0.0f, 1.0f), |
191 root_rect, child_solid_quad_rect); | 188 root_rect, child_solid_quad_rect); |
192 | 189 |
193 // Submit the frame. | 190 // Submit the frame. |
194 child_factory.Create(child_local_frame_id); | |
195 child_factory.SubmitCompositorFrame(child_local_frame_id, | 191 child_factory.SubmitCompositorFrame(child_local_frame_id, |
196 std::move(child_frame), | 192 std::move(child_frame), |
197 SurfaceFactory::DrawCallback()); | 193 SurfaceFactory::DrawCallback()); |
198 | 194 |
199 TestCase tests[] = { | 195 TestCase tests[] = { |
200 { | 196 { |
201 root_surface_id, | 197 root_surface_id, |
202 gfx::Point(10, 10), | 198 gfx::Point(10, 10), |
203 root_surface_id, | 199 root_surface_id, |
204 gfx::Point(10, 10) | 200 gfx::Point(10, 10) |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 | 261 |
266 gfx::Point point_in_target_space(100, 100); | 262 gfx::Point point_in_target_space(100, 100); |
267 gfx::Transform target_transform; | 263 gfx::Transform target_transform; |
268 EXPECT_TRUE(hittest.GetTransformToTargetSurface( | 264 EXPECT_TRUE(hittest.GetTransformToTargetSurface( |
269 root_surface_id, child_surface_id, &target_transform)); | 265 root_surface_id, child_surface_id, &target_transform)); |
270 target_transform.TransformPoint(&point_in_target_space); | 266 target_transform.TransformPoint(&point_in_target_space); |
271 EXPECT_NE(transform, target_transform); | 267 EXPECT_NE(transform, target_transform); |
272 EXPECT_EQ(gfx::Point(25, 25), point_in_target_space); | 268 EXPECT_EQ(gfx::Point(25, 25), point_in_target_space); |
273 } | 269 } |
274 | 270 |
275 root_factory.Destroy(root_local_frame_id); | 271 root_factory.EvictSurface(); |
276 child_factory.Destroy(child_local_frame_id); | 272 child_factory.EvictSurface(); |
277 } | 273 } |
278 | 274 |
279 // This test verifies that hit testing will progress to the next quad if it | 275 // This test verifies that hit testing will progress to the next quad if it |
280 // encounters an invalid RenderPassDrawQuad for whatever reason. | 276 // encounters an invalid RenderPassDrawQuad for whatever reason. |
281 TEST(SurfaceHittestTest, Hittest_InvalidRenderPassDrawQuad) { | 277 TEST(SurfaceHittestTest, Hittest_InvalidRenderPassDrawQuad) { |
282 SurfaceManager manager; | 278 SurfaceManager manager; |
283 | 279 |
284 // Set up root FrameSink. | 280 // Set up root FrameSink. |
285 EmptySurfaceFactoryClient root_client; | 281 EmptySurfaceFactoryClient root_client; |
286 FrameSinkId root_frame_sink_id(1, 1); | 282 FrameSinkId root_frame_sink_id(1, 1); |
(...skipping 27 matching lines...) Expand all Loading... |
314 0.0f, 0.0f, 1.0f, 0.0f, | 310 0.0f, 0.0f, 1.0f, 0.0f, |
315 0.0f, 0.0f, 0.0f, 1.0f), | 311 0.0f, 0.0f, 0.0f, 1.0f), |
316 root_rect, | 312 root_rect, |
317 child_rect, | 313 child_rect, |
318 child_surface_id); | 314 child_surface_id); |
319 | 315 |
320 // Submit the root frame. | 316 // Submit the root frame. |
321 SurfaceIdAllocator root_allocator; | 317 SurfaceIdAllocator root_allocator; |
322 LocalFrameId root_local_frame_id = root_allocator.GenerateId(); | 318 LocalFrameId root_local_frame_id = root_allocator.GenerateId(); |
323 SurfaceId root_surface_id(root_frame_sink_id, root_local_frame_id); | 319 SurfaceId root_surface_id(root_frame_sink_id, root_local_frame_id); |
324 root_factory.Create(root_local_frame_id); | |
325 root_factory.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame), | 320 root_factory.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame), |
326 SurfaceFactory::DrawCallback()); | 321 SurfaceFactory::DrawCallback()); |
327 | 322 |
328 // Creates a child surface. | 323 // Creates a child surface. |
329 RenderPass* child_pass = nullptr; | 324 RenderPass* child_pass = nullptr; |
330 CompositorFrame child_frame = CreateCompositorFrame(child_rect, &child_pass); | 325 CompositorFrame child_frame = CreateCompositorFrame(child_rect, &child_pass); |
331 | 326 |
332 // Add a solid quad in the child surface. | 327 // Add a solid quad in the child surface. |
333 gfx::Rect child_solid_quad_rect(100, 100); | 328 gfx::Rect child_solid_quad_rect(100, 100); |
334 CreateSolidColorDrawQuad(child_pass, | 329 CreateSolidColorDrawQuad(child_pass, |
335 gfx::Transform(1.0f, 0.0f, 0.0f, 50.0f, | 330 gfx::Transform(1.0f, 0.0f, 0.0f, 50.0f, |
336 0.0f, 1.0f, 0.0f, 50.0f, | 331 0.0f, 1.0f, 0.0f, 50.0f, |
337 0.0f, 0.0f, 1.0f, 0.0f, | 332 0.0f, 0.0f, 1.0f, 0.0f, |
338 0.0f, 0.0f, 0.0f, 1.0f), | 333 0.0f, 0.0f, 0.0f, 1.0f), |
339 root_rect, | 334 root_rect, |
340 child_solid_quad_rect); | 335 child_solid_quad_rect); |
341 | 336 |
342 // Submit the frame. | 337 // Submit the frame. |
343 child_factory.Create(child_local_frame_id); | |
344 child_factory.SubmitCompositorFrame(child_local_frame_id, | 338 child_factory.SubmitCompositorFrame(child_local_frame_id, |
345 std::move(child_frame), | 339 std::move(child_frame), |
346 SurfaceFactory::DrawCallback()); | 340 SurfaceFactory::DrawCallback()); |
347 | 341 |
348 TestCase tests[] = { | 342 TestCase tests[] = { |
349 { | 343 { |
350 root_surface_id, | 344 root_surface_id, |
351 gfx::Point(10, 10), | 345 gfx::Point(10, 10), |
352 root_surface_id, | 346 root_surface_id, |
353 gfx::Point(10, 10) | 347 gfx::Point(10, 10) |
(...skipping 25 matching lines...) Expand all Loading... |
379 { | 373 { |
380 root_surface_id, | 374 root_surface_id, |
381 gfx::Point(290, 290), | 375 gfx::Point(290, 290), |
382 root_surface_id, | 376 root_surface_id, |
383 gfx::Point(290, 290) | 377 gfx::Point(290, 290) |
384 } | 378 } |
385 }; | 379 }; |
386 | 380 |
387 RunTests(nullptr, &manager, tests, arraysize(tests)); | 381 RunTests(nullptr, &manager, tests, arraysize(tests)); |
388 | 382 |
389 root_factory.Destroy(root_local_frame_id); | 383 root_factory.EvictSurface(); |
390 child_factory.Destroy(child_local_frame_id); | 384 child_factory.EvictSurface(); |
391 } | 385 } |
392 | 386 |
393 TEST(SurfaceHittestTest, Hittest_RenderPassDrawQuad) { | 387 TEST(SurfaceHittestTest, Hittest_RenderPassDrawQuad) { |
394 SurfaceManager manager; | 388 SurfaceManager manager; |
395 EmptySurfaceFactoryClient client; | 389 EmptySurfaceFactoryClient client; |
396 FrameSinkId root_frame_sink_id(kArbitraryFrameSinkId); | 390 FrameSinkId root_frame_sink_id(kArbitraryFrameSinkId); |
397 SurfaceFactory factory(root_frame_sink_id, &manager, &client); | 391 SurfaceFactory factory(root_frame_sink_id, &manager, &client); |
398 | 392 |
399 // Create a CompostiorFrame with two RenderPasses. | 393 // Create a CompostiorFrame with two RenderPasses. |
400 gfx::Rect root_rect(300, 300); | 394 gfx::Rect root_rect(300, 300); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 gfx::Rect child_solid_quad_rect(100, 100); | 427 gfx::Rect child_solid_quad_rect(100, 100); |
434 CreateSolidColorDrawQuad(child_render_pass, | 428 CreateSolidColorDrawQuad(child_render_pass, |
435 gfx::Transform(), | 429 gfx::Transform(), |
436 gfx::Rect(100, 100), | 430 gfx::Rect(100, 100), |
437 child_solid_quad_rect); | 431 child_solid_quad_rect); |
438 | 432 |
439 // Submit the root frame. | 433 // Submit the root frame. |
440 SurfaceIdAllocator root_allocator; | 434 SurfaceIdAllocator root_allocator; |
441 LocalFrameId root_local_frame_id = root_allocator.GenerateId(); | 435 LocalFrameId root_local_frame_id = root_allocator.GenerateId(); |
442 SurfaceId root_surface_id(root_frame_sink_id, root_local_frame_id); | 436 SurfaceId root_surface_id(root_frame_sink_id, root_local_frame_id); |
443 factory.Create(root_local_frame_id); | |
444 factory.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame), | 437 factory.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame), |
445 SurfaceFactory::DrawCallback()); | 438 SurfaceFactory::DrawCallback()); |
446 | 439 |
447 TestCase tests[] = { | 440 TestCase tests[] = { |
448 // These tests just miss the RenderPassDrawQuad. | 441 // These tests just miss the RenderPassDrawQuad. |
449 { | 442 { |
450 root_surface_id, | 443 root_surface_id, |
451 gfx::Point(49, 49), | 444 gfx::Point(49, 49), |
452 root_surface_id, | 445 root_surface_id, |
453 gfx::Point(49, 49) | 446 gfx::Point(49, 49) |
(...skipping 29 matching lines...) Expand all Loading... |
483 { | 476 { |
484 root_surface_id, | 477 root_surface_id, |
485 gfx::Point(100, 100), | 478 gfx::Point(100, 100), |
486 root_surface_id, | 479 root_surface_id, |
487 gfx::Point(100, 100) | 480 gfx::Point(100, 100) |
488 } | 481 } |
489 }; | 482 }; |
490 | 483 |
491 RunTests(nullptr, &manager, tests, arraysize(tests)); | 484 RunTests(nullptr, &manager, tests, arraysize(tests)); |
492 | 485 |
493 factory.Destroy(root_local_frame_id); | 486 factory.EvictSurface(); |
494 } | 487 } |
495 | 488 |
496 TEST(SurfaceHittestTest, Hittest_SingleSurface_WithInsetsDelegate) { | 489 TEST(SurfaceHittestTest, Hittest_SingleSurface_WithInsetsDelegate) { |
497 SurfaceManager manager; | 490 SurfaceManager manager; |
498 | 491 |
499 // Set up root FrameSink. | 492 // Set up root FrameSink. |
500 EmptySurfaceFactoryClient root_client; | 493 EmptySurfaceFactoryClient root_client; |
501 FrameSinkId root_frame_sink_id(1, 1); | 494 FrameSinkId root_frame_sink_id(1, 1); |
502 SurfaceFactory root_factory(root_frame_sink_id, &manager, &root_client); | 495 SurfaceFactory root_factory(root_frame_sink_id, &manager, &root_client); |
503 | 496 |
(...skipping 17 matching lines...) Expand all Loading... |
521 gfx::Transform(1.0f, 0.0f, 0.0f, 50.0f, | 514 gfx::Transform(1.0f, 0.0f, 0.0f, 50.0f, |
522 0.0f, 1.0f, 0.0f, 50.0f, | 515 0.0f, 1.0f, 0.0f, 50.0f, |
523 0.0f, 0.0f, 1.0f, 0.0f, | 516 0.0f, 0.0f, 1.0f, 0.0f, |
524 0.0f, 0.0f, 0.0f, 1.0f), | 517 0.0f, 0.0f, 0.0f, 1.0f), |
525 root_rect, child_rect, child_surface_id); | 518 root_rect, child_rect, child_surface_id); |
526 | 519 |
527 // Submit the root frame. | 520 // Submit the root frame. |
528 SurfaceIdAllocator root_allocator; | 521 SurfaceIdAllocator root_allocator; |
529 LocalFrameId root_local_frame_id = root_allocator.GenerateId(); | 522 LocalFrameId root_local_frame_id = root_allocator.GenerateId(); |
530 SurfaceId root_surface_id(root_frame_sink_id, root_local_frame_id); | 523 SurfaceId root_surface_id(root_frame_sink_id, root_local_frame_id); |
531 root_factory.Create(root_local_frame_id); | |
532 root_factory.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame), | 524 root_factory.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame), |
533 SurfaceFactory::DrawCallback()); | 525 SurfaceFactory::DrawCallback()); |
534 | 526 |
535 // Creates a child surface. | 527 // Creates a child surface. |
536 RenderPass* child_pass = nullptr; | 528 RenderPass* child_pass = nullptr; |
537 CompositorFrame child_frame = CreateCompositorFrame(child_rect, &child_pass); | 529 CompositorFrame child_frame = CreateCompositorFrame(child_rect, &child_pass); |
538 | 530 |
539 // Add a solid quad in the child surface. | 531 // Add a solid quad in the child surface. |
540 gfx::Rect child_solid_quad_rect(190, 190); | 532 gfx::Rect child_solid_quad_rect(190, 190); |
541 CreateSolidColorDrawQuad( | 533 CreateSolidColorDrawQuad( |
542 child_pass, | 534 child_pass, |
543 gfx::Transform(1.0f, 0.0f, 0.0f, 5.0f, 0.0f, 1.0f, 0.0f, 5.0f, 0.0f, 0.0f, | 535 gfx::Transform(1.0f, 0.0f, 0.0f, 5.0f, 0.0f, 1.0f, 0.0f, 5.0f, 0.0f, 0.0f, |
544 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f), | 536 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f), |
545 root_rect, child_solid_quad_rect); | 537 root_rect, child_solid_quad_rect); |
546 | 538 |
547 // Submit the frame. | 539 // Submit the frame. |
548 child_factory.Create(child_local_frame_id); | |
549 child_factory.SubmitCompositorFrame(child_local_frame_id, | 540 child_factory.SubmitCompositorFrame(child_local_frame_id, |
550 std::move(child_frame), | 541 std::move(child_frame), |
551 SurfaceFactory::DrawCallback()); | 542 SurfaceFactory::DrawCallback()); |
552 | 543 |
553 TestCase test_expectations_without_insets[] = { | 544 TestCase test_expectations_without_insets[] = { |
554 {root_surface_id, gfx::Point(55, 55), child_surface_id, gfx::Point(5, 5)}, | 545 {root_surface_id, gfx::Point(55, 55), child_surface_id, gfx::Point(5, 5)}, |
555 {root_surface_id, gfx::Point(60, 60), child_surface_id, | 546 {root_surface_id, gfx::Point(60, 60), child_surface_id, |
556 gfx::Point(10, 10)}, | 547 gfx::Point(10, 10)}, |
557 {root_surface_id, gfx::Point(239, 239), child_surface_id, | 548 {root_surface_id, gfx::Point(239, 239), child_surface_id, |
558 gfx::Point(189, 189)}, | 549 gfx::Point(189, 189)}, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 TestSurfaceHittestDelegate accept_delegate; | 611 TestSurfaceHittestDelegate accept_delegate; |
621 accept_delegate.AddInsetsForAcceptSurface(child_surface_id, | 612 accept_delegate.AddInsetsForAcceptSurface(child_surface_id, |
622 gfx::Insets(5, 5, 5, 5)); | 613 gfx::Insets(5, 5, 5, 5)); |
623 RunTests(&accept_delegate, &manager, test_expectations_with_accept_insets, | 614 RunTests(&accept_delegate, &manager, test_expectations_with_accept_insets, |
624 arraysize(test_expectations_with_accept_insets)); | 615 arraysize(test_expectations_with_accept_insets)); |
625 | 616 |
626 // Verify that insets have affected hit targeting. | 617 // Verify that insets have affected hit targeting. |
627 EXPECT_EQ(0, accept_delegate.reject_target_overrides()); | 618 EXPECT_EQ(0, accept_delegate.reject_target_overrides()); |
628 EXPECT_EQ(2, accept_delegate.accept_target_overrides()); | 619 EXPECT_EQ(2, accept_delegate.accept_target_overrides()); |
629 | 620 |
630 root_factory.Destroy(root_local_frame_id); | 621 root_factory.EvictSurface(); |
631 child_factory.Destroy(child_local_frame_id); | 622 child_factory.EvictSurface(); |
632 } | 623 } |
633 | 624 |
634 } // namespace cc | 625 } // namespace cc |
OLD | NEW |