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

Unified Diff: Source/core/platform/graphics/mac/GlyphPageTreeNodeMac.cpp

Issue 14574002: Replace some trivial WebKitSystemInterface wrappers with direct calls to SPI. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Radar links Created 7 years, 8 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
Index: Source/core/platform/graphics/mac/GlyphPageTreeNodeMac.cpp
diff --git a/Source/core/platform/graphics/mac/GlyphPageTreeNodeMac.cpp b/Source/core/platform/graphics/mac/GlyphPageTreeNodeMac.cpp
index bae31e80aab3ffc179edcfc8a6f0ad7ebe4ff70a..aec3a595626e8883b8ad638ed1e7c8eb7215f6d1 100644
--- a/Source/core/platform/graphics/mac/GlyphPageTreeNodeMac.cpp
+++ b/Source/core/platform/graphics/mac/GlyphPageTreeNodeMac.cpp
@@ -34,6 +34,12 @@
#include "core/platform/graphics/SimpleFontData.h"
#include "core/platform/mac/WebCoreSystemInterface.h"
+// Forward declare Mac SPIs.
+// Request for public API: rdar://13787589
+extern "C" {
+void CGFontGetGlyphsForUnichars(CGFontRef font, const UniChar chars[], CGGlyph glyphs[], size_t length);
+}
+
namespace WebCore {
static bool shouldUseCoreText(UChar* buffer, unsigned bufferLength, const SimpleFontData* fontData)
@@ -57,7 +63,7 @@ bool GlyphPage::fill(unsigned offset, unsigned length, UChar* buffer, unsigned b
Vector<CGGlyph, 512> glyphs(bufferLength);
if (!shouldUseCoreText(buffer, bufferLength, fontData)) {
- WKGetGlyphsForCharacters(fontData->platformData().cgFont(), buffer, glyphs.data(), bufferLength);
+ CGFontGetGlyphsForUnichars(fontData->platformData().cgFont(), buffer, glyphs.data(), bufferLength);
for (unsigned i = 0; i < length; ++i) {
if (!glyphs[i])
setGlyphDataForIndex(offset + i, 0, 0);
« no previous file with comments | « Source/core/platform/graphics/mac/FontCacheMac.mm ('k') | Source/core/platform/mac/WebCoreSystemInterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698