aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports
diff options
context:
space:
mode:
authorGravatar Ben Wagner <benjaminwagner@google.com>2016-10-04 13:49:42 -0400
committerGravatar Ben Wagner <benjaminwagner@google.com>2016-10-04 18:53:19 +0000
commit95ea469c6ac91011f2b08f74b14560a80b4ead8e (patch)
tree81817c629fe7096cbc9be24ab55eca15354cf7e6 /src/ports
parent3fdf52cf389d58be9ce4b948dfecffd53edb5da2 (diff)
Remove SkFontConfigInterface_direct_google3.
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2931 Change-Id: I4aa4e94453601e566e30d61ad286f58786477cfb Reviewed-on: https://skia-review.googlesource.com/2931 Reviewed-by: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src/ports')
-rw-r--r--src/ports/SkFontConfigInterface_direct_google3.cpp34
-rw-r--r--src/ports/SkFontConfigInterface_direct_google3.h26
-rw-r--r--src/ports/SkFontConfigInterface_direct_google3_factory.cpp16
3 files changed, 0 insertions, 76 deletions
diff --git a/src/ports/SkFontConfigInterface_direct_google3.cpp b/src/ports/SkFontConfigInterface_direct_google3.cpp
deleted file mode 100644
index d3f34d0abc..0000000000
--- a/src/ports/SkFontConfigInterface_direct_google3.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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 "google_font_file_buffering.h"
-
-#include "SkFontConfigInterface_direct_google3.h"
-#include "SkStream.h"
-#include "SkString.h"
-#include "SkTypes.h"
-
-bool SkFontConfigInterfaceDirectGoogle3::isAccessible(const char* filename) {
- // Check if this font has been pre-loaded into memory.
- const char* unused;
- if (GoogleFreeType::GoogleFt2ReadFontFromMemory(filename, &unused) >= 0) {
- return true;
- }
- return this->INHERITED::isAccessible(filename);
-}
-
-SkStreamAsset* SkFontConfigInterfaceDirectGoogle3::openStream(const FontIdentity& identity) {
- const char* c_filename = identity.fString.c_str();
- // Read the system fonts from the fonts we've pre-loaded into memory.
- const char* buffer;
- int length = GoogleFreeType::GoogleFt2ReadFontFromMemory(
- c_filename, &buffer);
- if (length >= 0) return new SkMemoryStream(buffer, length);
- return this->INHERITED::openStream(identity);
-}
diff --git a/src/ports/SkFontConfigInterface_direct_google3.h b/src/ports/SkFontConfigInterface_direct_google3.h
deleted file mode 100644
index fd5c5e2fed..0000000000
--- a/src/ports/SkFontConfigInterface_direct_google3.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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 "SkFontConfigInterface_direct.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;
-};
diff --git a/src/ports/SkFontConfigInterface_direct_google3_factory.cpp b/src/ports/SkFontConfigInterface_direct_google3_factory.cpp
deleted file mode 100644
index 9e863d4f0b..0000000000
--- a/src/ports/SkFontConfigInterface_direct_google3_factory.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * 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.
- */
-
-#include "SkFontConfigInterface_direct_google3.h"
-#include "SkOnce.h"
-
-SkFontConfigInterface* SkFontConfigInterface::GetSingletonDirectInterface() {
- static SkFontConfigInterface* singleton;
- static SkOnce once;
- once([]{ singleton = new SkFontConfigInterfaceDirectGoogle3(); });
- return singleton;
-}