[Webkit-unassigned] [Bug 32461] [Qt] Adding QPixmap/QImage support for the Qt hybrid layer
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Dec 29 09:02:45 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=32461
--- Comment #18 from Noam Rosenthal <noam.rosenthal at nokia.com> 2009-12-29 09:02:43 PST ---
I completely understand the concerns.
Note that the implicity is in webkit and not in Qt:
var img = new Image;
really creates an image element even when you don't use the DOM API...
Alternative approaches:
(1)
The returned property/signal-argument doesn't create an image element
implicitly, but rather gives you an option to do so implicitly:
myObject.somePixmapProperty.createImageElement();
it would also allow you to generate a data URL, if you want to use it for a
background instead:
myObject.somePixmapProperty.toDataUrl() // or encodeDataUrl()
(2)
We modify CachedImage::createImage(), in a #ifdef PLATFORM(QT), to recognize
the url and see that the image really needs to be native and loaded directly.
This is the only place I can see where I can do a direct URL->WebCore::Image
conversion, all the other places require me to translate the pixmap to a QImage
and back, which beats the purpose, especially if the pixmap is in video memory.
(3)
Any other option - you choose it, I'll implement.
I don't mind implementing either of those, but I wouldn't want to see them
rejected again because of an architectural concern... can we pick an approach
and go with it? :) Sometimes perfect is the enemy of good-enough, and in this
case we're really trying to do something rather simple.
--
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