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

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: Missing param 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..d49024e75fe3a1afdc8f00503407891cb01b0f81 100644
--- a/Source/core/platform/graphics/mac/GlyphPageTreeNodeMac.cpp
+++ b/Source/core/platform/graphics/mac/GlyphPageTreeNodeMac.cpp
@@ -34,6 +34,11 @@
#include "core/platform/graphics/SimpleFontData.h"
#include "core/platform/mac/WebCoreSystemInterface.h"
+// Forward declare Mac SPIs.
+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 +62,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);
Nico 2013/05/01 01:02:18 Same question.
Robert Sesek 2013/05/01 23:58:43 Done.
for (unsigned i = 0; i < length; ++i) {
if (!glyphs[i])
setGlyphDataForIndex(offset + i, 0, 0);

Powered by Google App Engine
This is Rietveld 408576698