mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 587395: Expose whether DWrite is enabled through nsIGfxInfo. r=joedrew
This commit is contained in:
parent
8e08f7907f
commit
024d8acf0d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user