|
From: <br...@ph...> - 2006-07-09 10:27:45
|
Petr Mikulik wrote: > I think that the "producer" of these ".4068 g" should eliminate to call > term->set_color() if it is not needed for any drawing. I'm afraid you think quite wrongly here. The problem is that there's no way the core can know whether that call is needed to get a correct drawing or not. The API call's name is "set color", not "change color", so it should be obvious that the core is perfectly allowed to set the color to the same value as often as it likes. If a driver has a problem with that, it should take care of it itself. If there are many such drivers, let them delegate the work to a shared lower-level function or let term.c offer an intermediate layer (along the lines of term.c:term_suspend, the only caller of term->suspend). We almost have such an intermediate function already: there are rather few functions of the core that actually call term->set_color: color.c:set_color() color.c:set_rgbcolor() gadgets.c: apply_pm3dcolor() > Is it some "hidden3d" code? I must say I'm rather negatively surprised by you asking this question at this time. How come that you have to ask, days after you rather openly blamed hidden3d for this? |