| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 EmptySurfaceFactoryClient client; | 63 EmptySurfaceFactoryClient client; |
| 64 SurfaceFactory factory(&manager, &client); | 64 SurfaceFactory factory(&manager, &client); |
| 65 | 65 |
| 66 // Creates a root surface. | 66 // Creates a root surface. |
| 67 gfx::Rect root_rect(300, 300); | 67 gfx::Rect root_rect(300, 300); |
| 68 RenderPass* root_pass = nullptr; | 68 RenderPass* root_pass = nullptr; |
| 69 std::unique_ptr<CompositorFrame> root_frame = | 69 std::unique_ptr<CompositorFrame> root_frame = |
| 70 CreateCompositorFrame(root_rect, &root_pass); | 70 CreateCompositorFrame(root_rect, &root_pass); |
| 71 | 71 |
| 72 // Add a reference to a non-existant child surface on the root surface. | 72 // Add a reference to a non-existant child surface on the root surface. |
| 73 SurfaceIdAllocator child_allocator(3); | 73 SurfaceId child_surface_id(3, 0xdeadbeef, 0); |
| 74 SurfaceId child_surface_id; | |
| 75 child_surface_id.id = 0xdeadbeef; | |
| 76 gfx::Rect child_rect(200, 200); | 74 gfx::Rect child_rect(200, 200); |
| 77 CreateSurfaceDrawQuad(root_pass, | 75 CreateSurfaceDrawQuad(root_pass, |
| 78 gfx::Transform(), | 76 gfx::Transform(), |
| 79 root_rect, | 77 root_rect, |
| 80 child_rect, | 78 child_rect, |
| 81 child_surface_id); | 79 child_surface_id); |
| 82 | 80 |
| 83 // Submit the root frame. | 81 // Submit the root frame. |
| 84 SurfaceIdAllocator root_allocator(2); | 82 SurfaceIdAllocator root_allocator(2); |
| 85 SurfaceId root_surface_id = root_allocator.GenerateId(); | 83 SurfaceId root_surface_id = root_allocator.GenerateId(); |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 arraysize(test_expectations_with_accept_insets)); | 589 arraysize(test_expectations_with_accept_insets)); |
| 592 | 590 |
| 593 // Verify that insets have affected hit targeting. | 591 // Verify that insets have affected hit targeting. |
| 594 EXPECT_EQ(0, accept_delegate.reject_target_overrides()); | 592 EXPECT_EQ(0, accept_delegate.reject_target_overrides()); |
| 595 EXPECT_EQ(2, accept_delegate.accept_target_overrides()); | 593 EXPECT_EQ(2, accept_delegate.accept_target_overrides()); |
| 596 | 594 |
| 597 factory.Destroy(root_surface_id); | 595 factory.Destroy(root_surface_id); |
| 598 } | 596 } |
| 599 | 597 |
| 600 } // namespace cc | 598 } // namespace cc |
| OLD | NEW |