|
From: Ethan A M. <merritt@u.washington.edu> - 2006-07-08 22:37:56
|
On Saturday 08 July 2006 02:57 pm, 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. Is it some "hidden3d" > code? It's not so easy as you make it sound. The logic of the higher level code is 1) determine color of rectangle (or other object) 2) set color 3) draw the object But the object is drawn by invoking a hierarchy of lower level routines, and at those levels hidden3d, or clipping, or various other filters, may cause the object not to be passed through to the driver after all. By that time the set_color command has already been sent. Have a look at the second patch to pslatex.trm that I posted on SourceForge for this bug. The amount of code added to pslatex.trm to filter out unnecessary set_color commands is relatively small. A similar thing could be done, I think, for the small number of other drivers that need it. But each one will have to be considered on its own. To do this in the core code would be much, much messier. In fact, it would be impossible to do correctly for epslatex. epslatex has two output streams, and the commands are properly sent to one but not the other. How would you have the core code deal with that? I think that specific micro-optimization is too driver-dependent to be done at a higher level. -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle 98195-7742 |