[Webkit-unassigned] [Bug 89865] [Qt] Avoid a deep copy of QImage in GraphicsContext3D::getImageData.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jun 25 17:22:36 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=89865
--- Comment #3 from Huang Dongsung <luxtella at company100.net> 2012-06-25 17:22:34 PST ---
Would you mind explain more detail? I don't fully understand.
As I understand, you means the two code stubs are different?
1. Original
nativeImage = nativePixmap->toImage().convertToFormat(QImage::Format_ARGB32);
2. Changed (For Qt4)
QImage qtImage;
qtImage = nativePixmap->toImage();
nativeImage = qtImage.convertToFormat(QImage::Format_ARGB32);
If the two is different and original stub is correct, can I change like this?
- nativeImage = nativePixmap->toImage().convertToFormat(QImage::Format_ARGB32);
+#if HAVE(QT5)
+ // With QPA, we can avoid a deep copy.
+ nativeImage = nativePixmap->handle()->buffer()->convertToFormat(QImage::Format_ARGB32);
+#else
+ // This might be a deep copy, depending on other references to the pixmap.
+ nativeImage = nativePixmap->toImage().convertToFormat(QImage::Format_ARGB32);
+#endif
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list