summaryrefslogtreecommitdiffstats
path: root/gfx/skia/skia/src/fonts/SkRemotableFontMgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/skia/skia/src/fonts/SkRemotableFontMgr.cpp')
-rw-r--r--gfx/skia/skia/src/fonts/SkRemotableFontMgr.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/gfx/skia/skia/src/fonts/SkRemotableFontMgr.cpp b/gfx/skia/skia/src/fonts/SkRemotableFontMgr.cpp
new file mode 100644
index 0000000000..d8c904a566
--- /dev/null
+++ b/gfx/skia/skia/src/fonts/SkRemotableFontMgr.cpp
@@ -0,0 +1,23 @@
+/*
+ * 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 "include/ports/SkRemotableFontMgr.h"
+#include "include/private/base/SkOnce.h"
+
+SkRemotableFontIdentitySet::SkRemotableFontIdentitySet(int count, SkFontIdentity** data)
+ : fCount(count), fData(count)
+{
+ SkASSERT(data);
+ *data = fData.get();
+}
+
+SkRemotableFontIdentitySet* SkRemotableFontIdentitySet::NewEmpty() {
+ static SkOnce once;
+ static SkRemotableFontIdentitySet* empty;
+ once([]{ empty = new SkRemotableFontIdentitySet; });
+ return SkRef(empty);
+}