summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintbuffer_p.h
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-09-04 13:08:44 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-09-04 14:29:01 (GMT)
commitf0b0ab1291dec59ae2fe1e88a3b20d173772e175 (patch)
tree2d9e186581a7ece5fdd3e6a15b72796b6424b24b /src/gui/painting/qpaintbuffer_p.h
parent57447242994a16e30d3cb199eefaf625f0088f9f (diff)
downloadQt-f0b0ab1291dec59ae2fe1e88a3b20d173772e175.zip
Qt-f0b0ab1291dec59ae2fe1e88a3b20d173772e175.tar.gz
Qt-f0b0ab1291dec59ae2fe1e88a3b20d173772e175.tar.bz2
Added multiple frames to QPaintBuffer.
This lets us stream a single QPaintBuffer instead of one QPaintBuffer per frame in the trace graphicssystem, which leads to not streaming pixmaps / images once per frame. Performance when doing a trace is also a lot better for painting heavy applications. Reviewed-by: Trond
Diffstat (limited to 'src/gui/painting/qpaintbuffer_p.h')
-rw-r--r--src/gui/painting/qpaintbuffer_p.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/painting/qpaintbuffer_p.h b/src/gui/painting/qpaintbuffer_p.h
index b360279..2cb1d7c 100644
--- a/src/gui/painting/qpaintbuffer_p.h
+++ b/src/gui/painting/qpaintbuffer_p.h
@@ -71,7 +71,10 @@ public:
bool isEmpty() const;
- void draw(QPainter *painter) const;
+ void beginNewFrame();
+ int numFrames() const;
+
+ void draw(QPainter *painter, int frame = 0) const;
void setBoundingRect(const QRectF &rect);
QRectF boundingRect() const;
@@ -270,6 +273,7 @@ public:
QVector<QVariant> variants;
QVector<QPaintBufferCommand> commands;
+ QList<int> frames;
QPaintBufferEngine *engine;
QRectF boundingRect;
@@ -306,7 +310,7 @@ public:
void setupTransform(QPainter *painter);
void process(const QPaintBufferCommand &cmd);
- void draw(const QPaintBuffer &buffer, QPainter *painter);
+ void draw(const QPaintBuffer &buffer, QPainter *painter, int frame);
protected:
QPaintBufferPrivate *d;