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.
5 #include "cc/surfaces/surface_id_allocator.h"
9 SurfaceIdAllocator::SurfaceIdAllocator(uint32_t id_namespace
)
10 : id_namespace_(id_namespace
), next_id_(1u) {
13 SurfaceId
SurfaceIdAllocator::GenerateId() {
14 SurfaceId
id(static_cast<uint64_t>(id_namespace_
) << 32 | next_id_
);
20 uint32_t SurfaceIdAllocator::NamespaceForId(SurfaceId id
) {