зеркало из https://github.com/mozilla/gecko-dev.git
Bug 587395: Expose whether DWrite is enabled through nsIGfxInfo. r=joedrew
This commit is contained in:
Родитель
7d7234561e
Коммит
481d148c13
|
@ -213,6 +213,9 @@ public:
|
|||
|
||||
#ifdef CAIRO_HAS_DWRITE_FONT
|
||||
IDWriteFactory *GetDWriteFactory() { return mDWriteFactory; }
|
||||
inline PRBool DWriteEnabled() { return !!mDWriteFactory; }
|
||||
#else
|
||||
inline PRBool DWriteEnabled() { return PR_FALSE; }
|
||||
#endif
|
||||
#ifdef CAIRO_HAS_D2D_SURFACE
|
||||
cairo_device_t *GetD2DDevice() { return mD2DDevice; }
|
||||
|
|
|
@ -38,9 +38,12 @@
|
|||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
/* NOTE: this interface is completely undesigned, not stable and likely to change */
|
||||
|
||||
[scriptable, uuid(5C05E5B7-0FCC-4070-BF6B-58BC33ECA427)]
|
||||
interface nsIGfxInfo : nsISupports
|
||||
{
|
||||
readonly attribute boolean D2DEnabled;
|
||||
readonly attribute boolean DWriteEnabled;
|
||||
};
|
||||
|
||||
|
|
|
@ -47,3 +47,9 @@ nsresult GfxInfo::GetD2DEnabled(PRBool *aEnabled)
|
|||
*aEnabled = gfxWindowsPlatform::GetPlatform()->GetRenderMode() == gfxWindowsPlatform::RENDER_DIRECT2D;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult GfxInfo::GetDWriteEnabled(PRBool *aEnabled)
|
||||
{
|
||||
*aEnabled = gfxWindowsPlatform::GetPlatform()->DWriteEnabled();
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче