GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Wed Sep 17, 2014 9:33 am

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: gtk_widget_modify_bg latency.
PostPosted: Mon Aug 12, 2013 1:33 am 
Offline
GTK+ Geek

Joined: Wed Mar 18, 2009 2:26 pm
Posts: 62
Hello all
I have been using gtk_widget_override_background_color or gtk_widget_modify_bg(GTK 2.0) many times.
I don't know much about the source of both these functions.
But i would like to know that if a widget is already painted with the a particular color and if you call any of the above two functions to paint the same widget with the same color, does GTK still repaint the widget all over again.

What I mean is if for example: it takes 10 clock cycles to perform the whole gtk_widget_modify_bg() operation. Then every time I would call this function with the same color I would be wasting 10 clock cycles repainting the widget with the same color.
Rather than that i could set a flag to show that the widget is painted with the same color and spend 2 clock cycles with a "if condition" to check this flag; rather than wasting 10 clock cycles every time.

OR
does gtk_widget_modify_bg() perform an internal check automatically before repainting?

Any one have any ideas, sorry for the lengthy question.

_________________
Hello, העלו, Здравствулте!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group