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

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

Issue 1535833002: Delete CC. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-5
Patch Set: rebase Created 4 years, 11 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "cc/surfaces/surface_id_allocator.h"
6
7 namespace cc {
8
9 SurfaceIdAllocator::SurfaceIdAllocator(uint32_t id_namespace)
10 : id_namespace_(id_namespace), next_id_(1u) {
11 }
12
13 SurfaceId SurfaceIdAllocator::GenerateId() {
14 SurfaceId id(static_cast<uint64_t>(id_namespace_) << 32 | next_id_);
15 next_id_++;
16 return id;
17 }
18
19 // static
20 uint32_t SurfaceIdAllocator::NamespaceForId(SurfaceId id) {
21 return id.id >> 32;
22 }
23
24 } // 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