path: root/src/gui/image/qplatformpixmap.cpp
diff options
authorMichael Brasser <>2012-12-07 22:15:49 -0600
committerThe Qt Project <>2013-01-11 21:24:23 +0100
commitf156e578d7f4b05f44a6e84b2173f1e69b856442 (patch)
tree9e47c7d240bc52236391c3e51c4b6c6f71124209 /src/gui/image/qplatformpixmap.cpp
parent9fa5191b6eca7fc96b4720d9b892b0e2a8ff1469 (diff)
Ensure raster pixmap cache key is the same as that of pixmap.toImage()
This is done to support texture uploads in an image provider. It ensures we can load the texture using QImage in the image provider, and when it is later painted as a pixmap, the cacheKey will be identical (assuming no format conversion was required). Change-Id: I54229511ed91ce5430cc478af5aff0d96685a2da Reviewed-by: Gunnar Sletta <>
Diffstat (limited to 'src/gui/image/qplatformpixmap.cpp')
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/image/qplatformpixmap.cpp b/src/gui/image/qplatformpixmap.cpp
index 2e12ae2e91..1d147e3d3c 100644
--- a/src/gui/image/qplatformpixmap.cpp
+++ b/src/gui/image/qplatformpixmap.cpp
@@ -173,6 +173,11 @@ void QPlatformPixmap::setSerialNumber(int serNo)
ser_no = serNo;
+void QPlatformPixmap::setDetachNumber(int detNo)
+ detach_no = detNo;
QImage QPlatformPixmap::toImage(const QRect &rect) const
if (rect.contains(QRect(0, 0, w, h)))