blob: aca8a0b193ff62f1cf9ae763580cc8e78dc142f9 [file] [log] [blame]
bungeman@google.com72cf4fc2014-03-21 22:48:32 +00001/*
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
mtkleinffa4a922016-05-05 16:05:56 -07008#include "SkOnce.h"
bungeman@google.com72cf4fc2014-03-21 22:48:32 +00009#include "SkRemotableFontMgr.h"
10
bungeman@google.com72cf4fc2014-03-21 22:48:32 +000011SkRemotableFontIdentitySet::SkRemotableFontIdentitySet(int count, SkFontIdentity** data)
12 : fCount(count), fData(count)
13{
14 SkASSERT(data);
15 *data = fData;
16}
17
bungeman@google.com72cf4fc2014-03-21 22:48:32 +000018SkRemotableFontIdentitySet* SkRemotableFontIdentitySet::NewEmpty() {
mtkleinffa4a922016-05-05 16:05:56 -070019 static SkOnce once;
20 static SkRemotableFontIdentitySet* empty;
21 once([]{ empty = new SkRemotableFontIdentitySet; });
22 return SkRef(empty);
bungeman@google.com72cf4fc2014-03-21 22:48:32 +000023}