• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 "SkRemotableFontMgr.h"
9 
10 #include "SkLazyPtr.h"
11 
SkRemotableFontIdentitySet(int count,SkFontIdentity ** data)12 SkRemotableFontIdentitySet::SkRemotableFontIdentitySet(int count, SkFontIdentity** data)
13       : fCount(count), fData(count)
14 {
15     SkASSERT(data);
16     *data = fData;
17 }
18 
NewEmptyImpl()19 SkRemotableFontIdentitySet* SkRemotableFontIdentitySet::NewEmptyImpl() {
20     return SkNEW(SkRemotableFontIdentitySet);
21 }
22 
NewEmpty()23 SkRemotableFontIdentitySet* SkRemotableFontIdentitySet::NewEmpty() {
24     SK_DECLARE_STATIC_LAZY_PTR(SkRemotableFontIdentitySet, empty, NewEmptyImpl);
25     return SkRef(empty.get());
26 }
27