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

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

Issue 2369793002: WIP: Propagate SurfaceID up window tree hierarchy
Patch Set: Fix input events: EventDispatcher ignores container windows Created 4 years, 2 months 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_id_allocator.h ('k') | cc/surfaces/surface_manager.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "cc/surfaces/surface_id_allocator.h" 5 #include "cc/surfaces/surface_id_allocator.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/rand_util.h" 9 #include "base/rand_util.h"
10 10
11 namespace cc { 11 namespace cc {
12 12
13 SurfaceIdAllocator::SurfaceIdAllocator(uint32_t client_id) 13 SurfaceIdAllocator::SurfaceIdAllocator(const FrameSinkId& frame_sink_id)
14 : client_id_(client_id), next_id_(1u) {} 14 : frame_sink_id_(frame_sink_id), next_id_(1u) {}
15 15
16 SurfaceIdAllocator::~SurfaceIdAllocator() { 16 SurfaceIdAllocator::~SurfaceIdAllocator() {
17 } 17 }
18 18
19 SurfaceId SurfaceIdAllocator::GenerateId() { 19 SurfaceId SurfaceIdAllocator::GenerateId() {
20 uint64_t nonce = base::RandUint64(); 20 uint64_t nonce = base::RandUint64();
21 SurfaceId id(client_id_, next_id_, nonce); 21 SurfaceId id(frame_sink_id_, next_id_, nonce);
22 next_id_++; 22 next_id_++;
23 return id; 23 return id;
24 } 24 }
25 25
26 } // namespace cc 26 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/surface_id_allocator.h ('k') | cc/surfaces/surface_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698