wagenknecht.org » Gunnar's Weblog » Dangerous uses of “new GC(Display)”   Admin | Sign Out  
Weblog | Pictures

Dangerous uses of “new GC(Display)”

Thursday, December 08th, 2005, 08:13:39 +0200, Gunnar Wagenknecht

Anybody out there doing this or who copied HTMLTextPresenter? Have a look at bug 119585.

A “new GC(Display)” is a very expensive operation on some platforms because it has to create an overlay window for the whole screen to allow for fullscreen drawing.

If the GC is not used for fullscreen drawing but only for getting some FontMetrics, it should be replaced by a “new GC(Shell)” or better by a “new GC(Control)”.

See bug #38528 for details.

One Response to “Dangerous uses of “new GC(Display)””

  1. Andrei Says:

    Thanks! Very useful hint.

Leave a Reply

Note, you can use these XHTML tags in your comment: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .

Gunnar's Weblog is proudly powered by WordPress and valid XHTML and CSS (hopefully...).
Entries (RSS) and Comments (RSS). Spawned in 0.437 seconds.