1/*
2 * Copyright 2014 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#include "SkOncePtr.h"
9#include "SkRemotableFontMgr.h"
10
11SkRemotableFontIdentitySet::SkRemotableFontIdentitySet(int count, SkFontIdentity** data)
12      : fCount(count), fData(count)
13{
14    SkASSERT(data);
15    *data = fData;
16}
17
18SK_DECLARE_STATIC_ONCE_PTR(SkRemotableFontIdentitySet, empty);
19SkRemotableFontIdentitySet* SkRemotableFontIdentitySet::NewEmpty() {
20    return SkRef(empty.get([]{ return new SkRemotableFontIdentitySet; }));
21}
22