mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Remove unused code in FontCacheSkia (#2805)
This commit is contained in:
parent
3a4e0a0c80
commit
6e92a5e34d
@ -49,24 +49,6 @@
|
||||
#include "third_party/skia/include/ports/SkFontConfigInterface.h"
|
||||
#endif
|
||||
|
||||
#if !OS(WIN) && !OS(ANDROID) && !OS(IOS) && !OS(MACOSX)
|
||||
// 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;
|
||||
fontIdentity.fID = fontconfigInterfaceId;
|
||||
return fci->openStream(fontIdentity);
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace blink {
|
||||
|
||||
static int toSkiaWeight(FontWeight weight)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user