Closed Bug 1325199 Opened 3 years ago Closed 3 years ago

gfxDWriteFont::GetGlyphRenderingOptions is slow

Categories

(Core :: Graphics: Text, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: bas.schouten, Assigned: bas.schouten)

References

Details

Attachments

(1 file)

We call this function a lot, every time we draw any text. It's slow due to it calling UsingClearType every time which calls the expensive SystemParameterInfo function. We can do better.
Comment on attachment 8820884 [details]
Bug 1325199: Only read system parameters for ClearType when we receive a paint event.

https://reviewboard.mozilla.org/r/100274/#review100798

::: gfx/thebes/gfxDWriteFonts.cpp:53
(Diff revision 1)
>  #endif
>  
> +bool gfxDWriteFont::mUseClearType = true;
> +
>  static bool
>  UsingClearType()

Add a comment that this function is expensive and we only want to call it when we have to.
Attachment #8820884 - Flags: review?(jmuizelaar) → review+
Pushed by bschouten@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/96cf05faacfe
Only read system parameters for ClearType when we receive a paint event. r=jrmuizel
https://hg.mozilla.org/mozilla-central/rev/96cf05faacfe
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Depends on: 1325743
Blocks: 1328496
See Also: → 1328496
No longer blocks: 1328496
Depends on: 1328496
You need to log in before you can comment on or make changes to this bug.