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

Unified Diff: sky/engine/platform/fonts/skia/FontCacheSkia.cpp

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 11 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 | « skia/skia_test_expectations.txt ('k') | sky/engine/platform/graphics/Canvas2DLayerBridge.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/platform/fonts/skia/FontCacheSkia.cpp
diff --git a/sky/engine/platform/fonts/skia/FontCacheSkia.cpp b/sky/engine/platform/fonts/skia/FontCacheSkia.cpp
index 75c3116b7ac26e1d030240575bf9c9e5484599e5..2654ba85b9ff35453b4a51b0fe81302c096f53aa 100644
--- a/sky/engine/platform/fonts/skia/FontCacheSkia.cpp
+++ b/sky/engine/platform/fonts/skia/FontCacheSkia.cpp
@@ -50,7 +50,15 @@
#include "third_party/skia/include/ports/SkFontMgr.h"
#if !OS(WIN) && !OS(ANDROID)
-static SkStream* streamForFontconfigInterfaceId(int fontconfigInterfaceId)
+// TODO(bungeman) remove this temporary code ASAP.
+// This namespace exists to ease transition of SkTypeface from using SkStream to SkStreamAsset.
+namespace tmp {
+// Like std::declval but only returns lvalue references, ok since it isn't used on rvalue references.
+template<typename T> T& declvall();
+// The return type of SkFontConfigInterface::openStream(const SkFontConfigInterface::FontIdentity&).
+using StreamType = decltype(tmp::declvall<SkFontConfigInterface>().openStream(tmp::declvall<const SkFontConfigInterface::FontIdentity&>()));
+}
+static tmp::StreamType streamForFontconfigInterfaceId(int fontconfigInterfaceId)
{
SkAutoTUnref<SkFontConfigInterface> fci(SkFontConfigInterface::RefGlobal());
SkFontConfigInterface::FontIdentity fontIdentity;
« no previous file with comments | « skia/skia_test_expectations.txt ('k') | sky/engine/platform/graphics/Canvas2DLayerBridge.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698