Stephan Witt wrote:
>> I don't see why that will help in this case. You're complaining that
>> we're going up and down the ADSL line to retrieve an image when we
>> should be using the cached pixmap on your local machine.
>>
>> I fail to see what we're doing wrong. Obviously.
>>
>
> I would guess the problem is the repaint operation itself.
> The "Painter" should not trigger the transfer of the pixmap
> at all when the user modifies the documents text content.
>
> Normally with an X event driven architecture you never draw to
> screen outside the XExposeEvent/XGraphicsExposeEvent events.
> You tell the X-Server the region which is updated by the appli-
> cation an the X-Server requests the repaint by the mentioned
> events.
Granted. I believe that the Qt frontend adheres to this model.
I tried to use bitBlt as Martin suggested. No improvement AFAICS. See how
it feels to you.
--
Angus
? src/frontends/qt2/qlimage.diff
Index: src/frontends/qt2/QLPainter.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QLPainter.C,v
retrieving revision 1.35
diff -u -p -r1.35 QLPainter.C
--- src/frontends/qt2/QLPainter.C 31 Jan 2005 15:26:39 -0000 1.35
+++ src/frontends/qt2/QLPainter.C 28 Apr 2005 08:38:56 -0000
@@ -171,7 +171,7 @@ void QLPainter::image(int x, int y, int
static_cast<lyx::graphics::QLImage const &>(i);
fillRectangle(x, y, w, h, LColor::graphicsbg);
- qp_->drawImage(x, y, qlimage.qimage(), 0, 0, w, h);
+ bitBlt (qp_->device(), x, y, &qlimage.qimage(), 0, 0, w, h);
}