Bug 587293: When D2D is preffed off, disable DWrite if it wasn't explicitly preffed on. r=joedrew

This commit is contained in:
Bas Schouten 2010-08-16 09:15:03 +02:00
Родитель 7769ad7bd1
Коммит 666b9f9b26
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -276,6 +276,11 @@ gfxWindowsPlatform::gfxWindowsPlatform()
PRInt32 rmode;
if (NS_SUCCEEDED(pref->GetIntPref("mozilla.widget.render-mode", &rmode))) {
if (rmode >= 0 && rmode < RENDER_MODE_MAX) {
#ifdef CAIRO_HAS_DWRITE_FONT
if (rmode != RENDER_DIRECT2D && !useDirectWrite) {
mDWriteFactory = nsnull;
}
#endif
#ifndef CAIRO_HAS_DDRAW_SURFACE
if (rmode == RENDER_DDRAW || rmode == RENDER_DDRAW_GL)
rmode = RENDER_IMAGE_STRETCH24;