[Webkit-unassigned] [Bug 21816] Clean up ImageBuffer.h so there do not have to be separate ifdefs for each platform

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 24 11:10:03 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=21816





------- Comment #12 from brettw at chromium.org  2008-10-24 11:10 PDT -------
The reason I added the m_initialized flag is because weinig didn't like the way
create created the PlatformImageBuffer and passed it into the constructor.
These are the only two reasonable ways to do it.

Passing the PlatformImageBuffer by value is totally unacceptable because for
some platforms there will be large amounts of data tied to it. I'm not sure
weinig understood this so I will try to make it more clear. In the Qt version,
the PlatformImageBuffer has a QPixmap. Copying this structure would imply
copying a large pixmap for no effect. It would also imply that we have some
kind of pointer ownership transfer to avoid copying the QPainter which would
make it much more complicated.

Our Skia port will look very much like the Qt version, where it would be
unacceptable to copy PlatformImageBuffer as weinig suggested twice.

If you have an approach that (1) never copies PlatformImageBuffers, (2) never
does an extra malloc in create and passes it into the constructor, (3) never
uses an extra flag, and (4) has the same constructors for each platform, I'm
happy to write it. But I don't know how to do that.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list