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

Unified Diff: src/ports/SkFontConfigInterface_direct_google3.h

Issue 1471033002: Fix Google3 fonts. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Fix BUILD.public, remove virtual from private method. Created 5 years, 1 month 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
Index: src/ports/SkFontConfigInterface_direct_google3.h
diff --git a/src/ports/SkFontConfigInterface_direct_google3.h b/src/ports/SkFontConfigInterface_direct_google3.h
new file mode 100644
index 0000000000000000000000000000000000000000..90eaa729bf960d917b86757beecb78e231b4c1f5
--- /dev/null
+++ b/src/ports/SkFontConfigInterface_direct_google3.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2009-2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/* migrated from chrome/src/skia/ext/SkFontHost_fontconfig_direct.cpp */
+
+#include "SkFontConfigInterfaceDirect.h"
+#include "SkStream.h"
+#include "SkTypes.h"
+
+// Loads fonts using GoogleFt2ReadFontFromMemory.
+class SkFontConfigInterfaceDirectGoogle3 : public SkFontConfigInterfaceDirect {
+public:
+ SkFontConfigInterfaceDirectGoogle3() {}
+ ~SkFontConfigInterfaceDirectGoogle3() override {}
+
+ SkStreamAsset* openStream(const FontIdentity&) override;
+protected:
+ // Override isAccessible to return true if the font is in the cache.
+ bool isAccessible(const char* filename) override;
+private:
+ typedef SkFontConfigInterfaceDirect INHERITED;
+};

Powered by Google App Engine
This is Rietveld 408576698