Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Unified Diff: src/fonts/SkRemotableFontMgr.cpp

Issue 206683002: A remotable font management interface and DirectWrite implementation. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/fonts/SkFontMgr_indirect.cpp ('k') | src/ports/SkFontHost_win.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/fonts/SkRemotableFontMgr.cpp
===================================================================
--- src/fonts/SkRemotableFontMgr.cpp (revision 0)
+++ src/fonts/SkRemotableFontMgr.cpp (working copy)
@@ -0,0 +1,32 @@
+/*
+ * 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 "SkRemotableFontMgr.h"
+
+#include "SkOnce.h"
+
+SkRemotableFontIdentitySet::SkRemotableFontIdentitySet(int count, SkFontIdentity** data)
+ : fCount(count), fData(count)
+{
+ SkASSERT(data);
+ *data = fData;
+}
+
+static SkRemotableFontIdentitySet* gEmptyRemotableFontIdentitySet = NULL;
+static void cleanup_gEmptyRemotableFontIdentitySet() { gEmptyRemotableFontIdentitySet->unref(); }
+
+void SkRemotableFontIdentitySet::NewEmptyImpl(int) {
+ gEmptyRemotableFontIdentitySet = new SkRemotableFontIdentitySet();
+}
+
+SkRemotableFontIdentitySet* SkRemotableFontIdentitySet::NewEmpty() {
+ SK_DECLARE_STATIC_ONCE(once);
+ SkOnce(&once, SkRemotableFontIdentitySet::NewEmptyImpl, 0,
+ cleanup_gEmptyRemotableFontIdentitySet);
+ gEmptyRemotableFontIdentitySet->ref();
+ return gEmptyRemotableFontIdentitySet;
+}
« no previous file with comments | « src/fonts/SkFontMgr_indirect.cpp ('k') | src/ports/SkFontHost_win.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698