Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: cc/surfaces/surface_hittest_unittest.cc

Issue 2494833002: Revert of Replaced cc::SurfaceId::nonce_ with base::UnguessableToken (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/surfaces/surface_factory_unittest.cc ('k') | cc/surfaces/surface_id.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 EmptySurfaceFactoryClient client; 65 EmptySurfaceFactoryClient client;
66 FrameSinkId root_frame_sink_id(kArbitraryFrameSinkId); 66 FrameSinkId root_frame_sink_id(kArbitraryFrameSinkId);
67 SurfaceFactory root_factory(root_frame_sink_id, &manager, &client); 67 SurfaceFactory root_factory(root_frame_sink_id, &manager, &client);
68 68
69 // Creates a root surface. 69 // Creates a root surface.
70 gfx::Rect root_rect(300, 300); 70 gfx::Rect root_rect(300, 300);
71 RenderPass* root_pass = nullptr; 71 RenderPass* root_pass = nullptr;
72 CompositorFrame root_frame = CreateCompositorFrame(root_rect, &root_pass); 72 CompositorFrame root_frame = CreateCompositorFrame(root_rect, &root_pass);
73 73
74 // Add a reference to a non-existant child surface on the root surface. 74 // Add a reference to a non-existant child surface on the root surface.
75 SurfaceId child_surface_id( 75 SurfaceId child_surface_id(kArbitraryFrameSinkId,
76 kArbitraryFrameSinkId, 76 LocalFrameId(0xdeadbeef, 0));
77 LocalFrameId(0xdeadbeef, base::UnguessableToken::Create()));
78 gfx::Rect child_rect(200, 200); 77 gfx::Rect child_rect(200, 200);
79 CreateSurfaceDrawQuad(root_pass, 78 CreateSurfaceDrawQuad(root_pass,
80 gfx::Transform(), 79 gfx::Transform(),
81 root_rect, 80 root_rect,
82 child_rect, 81 child_rect,
83 child_surface_id); 82 child_surface_id);
84 83
85 // Submit the root frame. 84 // Submit the root frame.
86 SurfaceIdAllocator root_allocator; 85 SurfaceIdAllocator root_allocator;
87 LocalFrameId root_local_frame_id = root_allocator.GenerateId(); 86 LocalFrameId root_local_frame_id = root_allocator.GenerateId();
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 624
626 // Verify that insets have affected hit targeting. 625 // Verify that insets have affected hit targeting.
627 EXPECT_EQ(0, accept_delegate.reject_target_overrides()); 626 EXPECT_EQ(0, accept_delegate.reject_target_overrides());
628 EXPECT_EQ(2, accept_delegate.accept_target_overrides()); 627 EXPECT_EQ(2, accept_delegate.accept_target_overrides());
629 628
630 root_factory.Destroy(root_local_frame_id); 629 root_factory.Destroy(root_local_frame_id);
631 child_factory.Destroy(child_local_frame_id); 630 child_factory.Destroy(child_local_frame_id);
632 } 631 }
633 632
634 } // namespace cc 633 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/surface_factory_unittest.cc ('k') | cc/surfaces/surface_id.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698