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

Unified Diff: content/common/font_config_ipc_linux.h

Issue 12764009: re-land 187283 -- switch to skia's version of SkFontHost_fontconfig (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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 | « content/browser/renderer_host/render_sandbox_host_linux.cc ('k') | content/common/font_config_ipc_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/font_config_ipc_linux.h
===================================================================
--- content/common/font_config_ipc_linux.h (revision 187566)
+++ content/common/font_config_ipc_linux.h (working copy)
@@ -6,7 +6,7 @@
#define CONTENT_COMMON_FONT_CONFIG_IPC_LINUX_H_
#include "base/compiler_specific.h"
-#include "skia/ext/SkFontHost_fontconfig_impl.h"
+#include "third_party/skia/include/ports/SkFontConfigInterface.h"
#include <string>
@@ -14,27 +14,28 @@
// FontConfig implementation for Skia that proxies out of process to get out
// of the sandbox. See http://code.google.com/p/chromium/wiki/LinuxSandboxIPC
-class FontConfigIPC : public FontConfigInterface {
+class FontConfigIPC : public SkFontConfigInterface {
public:
explicit FontConfigIPC(int fd);
virtual ~FontConfigIPC();
- // FontConfigInterface implementation.
- virtual bool Match(std::string* result_family,
- unsigned* result_filefaceid,
- bool filefaceid_valid,
- unsigned filefaceid,
- const std::string& family,
- const void* characters,
- size_t characters_bytes,
- bool* is_bold, bool* is_italic) OVERRIDE;
- virtual int Open(unsigned filefaceid) OVERRIDE;
+ virtual bool matchFamilyName(const char familyName[],
+ SkTypeface::Style requested,
+ FontIdentity* outFontIdentifier,
+ SkString* outFamilyName,
+ SkTypeface::Style* outStyle) OVERRIDE;
+ virtual SkStream* openStream(const FontIdentity&) OVERRIDE;
+
enum Method {
METHOD_MATCH = 0,
METHOD_OPEN = 1,
};
+ enum {
+ kMaxFontFamilyLength = 2048
+ };
+
private:
const int fd_;
};
« no previous file with comments | « content/browser/renderer_host/render_sandbox_host_linux.cc ('k') | content/common/font_config_ipc_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698