Re: Re: gdk_draw_layout seems that it doesn't make damage event for offscreens.



Title: Samsung Enterprise Portal mySingle
Yes, the double buffering handling does generate damage events.

Then, nomally widgets maybe doesn't have this kind of problem.

 

But "gtkperf" app draws layout to window directly in on_idle_gtkdrawingarea_text_test ( ).

(I attached "test.c" of "gtkperf" which includes "on_idle_gtkdrawingarea_text_test ( )")

So, this problem happens.

 

To resolve this problem, isn't it good approach to add draw_layout, draw_layout_line_with_colors

and draw_layout_with_colors to "struct _GdkDrawableClass" ?

 

-----Original Message-----
From: Alexander Larsson [mailto:alexl redhat com]
Sent: Monday, December 07, 2009 7:31 PM
To: boram1288 park samsung com
Cc: gtk-devel-list gnome org
Subject: Re: gdk_draw_layout seems that it doesn't make damage event for offscreens.

 

On Sun, 2009-12-06 at 13:04 +0000, 박보람 wrote:

 

> Currently I'm making some customized widgets with GTK+-2.18.

>

> To test performance about my customized widget, I'm using "gtkperf".

>

> But a problems running gtkperf.

 

> "gdk_draw_layout seems that it doesn't make damage event for

> offscreens"

>

> I wonder whether this problem is the known issue or not.

>

> Or I just made misunderstanding.

 

This is actually part of a larger problem. When you draw to an offscreen

window using cairo we don't currently report damage events, because

there is no way to virtualize these drawing operations such that we can

track them.

 

In practice this is not really a problem since most cairo stuff is

modern, and modern widgets draw everything double buffered, and the

double buffering handling does generate damage events.

 

It might be possible to make the specific case of gdk_draw_layout() to

cause damage events with some work. What exactly is your usecase here?

Do you draw directly to the window or from an expose handler?

 

--

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

 Alexander Larsson                                            Red Hat, Inc

       alexl redhat com            alexander larsson gmail com

He's a one-legged Amish assassin searching for his wife's true killer. She's a

cold-hearted wisecracking vampire from aristocratic European stock. They fight

crime!

Attachment: tests.c
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]