зеркало из https://github.com/mozilla/pjs.git
Bug 585817, part -1: Create and expose a scratch DC from gfxWindowsPlatform. r=roc
This commit is contained in:
Родитель
0a4de59cf6
Коммит
8e364166bf
|
@ -198,6 +198,8 @@ gfxWindowsPlatform::gfxWindowsPlatform()
|
|||
mUseClearTypeForDownloadableFonts = UNINITIALIZED_VALUE;
|
||||
mUseClearTypeAlways = UNINITIALIZED_VALUE;
|
||||
|
||||
mScreenDC = GetDC(NULL);
|
||||
|
||||
#ifdef MOZ_FT2_FONTS
|
||||
FT_Init_FreeType(&gPlatformFTLibrary);
|
||||
#endif
|
||||
|
@ -346,6 +348,7 @@ gfxWindowsPlatform::gfxWindowsPlatform()
|
|||
|
||||
gfxWindowsPlatform::~gfxWindowsPlatform()
|
||||
{
|
||||
::ReleaseDC(NULL, mScreenDC);
|
||||
// not calling FT_Done_FreeType because cairo may still hold references to
|
||||
// these FT_Faces. See bug 458169.
|
||||
#ifdef CAIRO_HAS_D2D_SURFACE
|
||||
|
|
|
@ -148,6 +148,8 @@ public:
|
|||
RenderMode GetRenderMode() { return mRenderMode; }
|
||||
void SetRenderMode(RenderMode rmode) { mRenderMode = rmode; }
|
||||
|
||||
HDC GetScreenDC() { return mScreenDC; }
|
||||
|
||||
nsresult GetFontList(nsIAtom *aLangGroup,
|
||||
const nsACString& aGenericFamily,
|
||||
nsTArray<nsString>& aListOfFonts);
|
||||
|
@ -230,6 +232,7 @@ protected:
|
|||
|
||||
PRBool mUseClearTypeForDownloadableFonts;
|
||||
PRBool mUseClearTypeAlways;
|
||||
HDC mScreenDC;
|
||||
|
||||
private:
|
||||
void Init();
|
||||
|
|
Загрузка…
Ссылка в новой задаче