Closed Bug 1294347 Opened 8 years ago Closed 8 years ago

Always use DirectWrite if available

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: dvander, Assigned: mchang)

References

(Blocks 1 open bug)

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file)

The crux of the GPU process plan is that we shouldn't have any hardware-accelerated devices in the UI process. This means, as soon as we flip the switch, the UI process will no longer use DirectWrite for font rendering, but instead GDI.

My understanding is:
 (1) GDI does not look as good as DWrite.
 (2) We do not support DWrite + Cairo. bug 1193641 had evidence of breakage, but it's not clear whether that was busted D2D or something.
 (3) Skia is coming, and D2D and Skia are supposed to work together.

Is it time (or almost time) to just always flip DWrite on?
Flags: needinfo?(jmuizelaar)
Flags: needinfo?(bas)
s/D2D and Skia/DWrite and Skia/
Using Skia with DWrite should work better than Cairo and DWrite. However, it looks like Skia does take advantage of DWrite functionality that is only in the Win7 platform update and newer (IDWriteFontFace1) so we may want to limit our usage of DWrite to only Win7 platform update or newer. This matches what we do with D2D today.
Flags: needinfo?(jmuizelaar)
Whiteboard: [gfx-noted]
Assignee: nobody → mchang
From the daily this morning: Let's always use Dwrite and Skia together unless on Windows XP because we have to use GDI there.
Comment on attachment 8780230 [details] [diff] [review]
Use Dwrite with Skia backend by default

Review of attachment 8780230 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!

::: gfx/thebes/gfxWindowsPlatform.cpp
@@ +415,5 @@
> +  }
> +
> +  // DWrite is only supported on Windows 7 with the platform update and higher.
> +  // We check this by seeing if D2D1 support is available.
> +  FeatureState& d2d1 = gfxConfig::GetFeature(Feature::DIRECT2D);

d2d1 looks unused here. I think the Factory check is all you need anyway.

@@ -1601,5 @@
>      }
> -
> -    // Usually we want D2D in order to use DWrite, but if the users have it
> -    // forced, we'll let them have it, as unsupported configuration.
> -    if (gfxPrefs::DirectWriteFontRenderingForceEnabled() && !mDWriteFactory) {

You can drop this pref from gfxPrefs now (or keep it, and keep this block).
Attachment #8780230 - Flags: review?(dvander) → review+
Flags: needinfo?(bas)
Pushed by mchang@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/130d79a7ad56
Use Dwrite fonts with the skia backend by default. r=dvander
https://hg.mozilla.org/mozilla-central/rev/130d79a7ad56
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: