[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: [PATCH] Limit KoPicture's memory usage
From: Nicolas Goutte <nicog () snafu ! de>
Date: 2002-07-26 12:13:52
[Download RAW message or body]
The patch is for lib/kofficecore/koPictureImage.cc
It forbids QT to cache the X-Window image. It saves memory (the size of one
image in display size) but makes things slower (visible in KWord.)
So I would ask people that have problems with KPresenter to test this patch
and report their success/failure/problem/critic...
David: would you prefer such a patch before or after RC1?
If this patch is not enough, I will try to put the raw data in a KTempFile. If
even this would not be enough, I would not have an idea how to change things
further.
Have a nice day/evening/night!
["patch.txt" (text/plain)]
--- koPictureImage.cc.orig Sat Jun 22 17:39:03 2002
+++ koPictureImage.cc Fri Jul 26 03:33:24 2002
@@ -27,14 +27,16 @@
#include <kconfig.h>
#include <kglobal.h>
#include <kmimetype.h>
+#include <kdebug.h>
+#include <kdebugclasses.h>
#include "koPictureKey.h"
#include "koPictureBase.h"
#include "koPictureImage.h"
-#include <kdebug.h>
KoPictureImage::KoPictureImage(void) : m_cacheIsInFastMode(true), \
m_resampleOnResize(false) {
+ m_cachedPixmap.setOptimization(QPixmap::MemoryOptim);
}
KoPictureImage::~KoPictureImage(void)
@@ -125,7 +127,7 @@
void KoPictureImage::draw(QPainter& painter, int x, int y, int width, int height, \
int sx, int sy, int sw, int sh, bool fastMode) {
- //kdDebug() << "KoImage::draw currentSize:" << currentSize.width() << "x" << \
currentSize.height() << endl; + kdDebug() << "KoPictureImage::draw width: " << \
width << " height: " << height << endl; if ( !width || !height )
return;
QSize origSize = getOriginalSize();
@@ -177,6 +179,7 @@
}
buffer.close();
m_originalImage=imageIO.image();
+ kdDebug(30003) << "Original size: " << m_originalImage.size() << endl;
return true;
}
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic