xref: /third_party/skia/src/fonts/SkRemotableFontMgr.cpp
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/skia/src/fonts/
1cb93a386Sopenharmony_ci/*
2cb93a386Sopenharmony_ci * Copyright 2014 Google Inc.
3cb93a386Sopenharmony_ci *
4cb93a386Sopenharmony_ci * Use of this source code is governed by a BSD-style license that can be
5cb93a386Sopenharmony_ci * found in the LICENSE file.
6cb93a386Sopenharmony_ci */
7cb93a386Sopenharmony_ci
8cb93a386Sopenharmony_ci#include "include/ports/SkRemotableFontMgr.h"
9cb93a386Sopenharmony_ci#include "include/private/SkOnce.h"
10cb93a386Sopenharmony_ci
11cb93a386Sopenharmony_ciSkRemotableFontIdentitySet::SkRemotableFontIdentitySet(int count, SkFontIdentity** data)
12cb93a386Sopenharmony_ci      : fCount(count), fData(count)
13cb93a386Sopenharmony_ci{
14cb93a386Sopenharmony_ci    SkASSERT(data);
15cb93a386Sopenharmony_ci    *data = fData.get();
16cb93a386Sopenharmony_ci}
17cb93a386Sopenharmony_ci
18cb93a386Sopenharmony_ciSkRemotableFontIdentitySet* SkRemotableFontIdentitySet::NewEmpty() {
19cb93a386Sopenharmony_ci    static SkOnce once;
20cb93a386Sopenharmony_ci    static SkRemotableFontIdentitySet* empty;
21cb93a386Sopenharmony_ci    once([]{ empty = new SkRemotableFontIdentitySet; });
22cb93a386Sopenharmony_ci    return SkRef(empty);
23cb93a386Sopenharmony_ci}
24

Indexes created Thu Nov 07 10:32:03 CST 2024