blob: aca8a0b193ff62f1cf9ae763580cc8e78dc142f9 [file] [log] [blame]
/*
* Copyright 2014 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkOnce.h"
#include "SkRemotableFontMgr.h"
SkRemotableFontIdentitySet::SkRemotableFontIdentitySet(int count, SkFontIdentity** data)
: fCount(count), fData(count)
{
SkASSERT(data);
*data = fData;
}
SkRemotableFontIdentitySet* SkRemotableFontIdentitySet::NewEmpty() {
static SkOnce once;
static SkRemotableFontIdentitySet* empty;
once([]{ empty = new SkRemotableFontIdentitySet; });
return SkRef(empty);
}