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