[webkit-dev] Re: WebKit graphics

Marc-Antoine Ruel maruel at gmail.com
Tue Jan 8 12:36:10 PST 2008


Hi Alp,

About bug 16095 <http://bugs.webkit.org/show_bug.cgi?id=16095>, you wrote:

«

The added feature seems unusable since, even if the classes are subclassed,
there is still static code instantiating the base class in GraphicsContext. In
light of this, I think this patch is incomplete or wrong.

»

The thing is that GraphicsContext is never subclassed but "specialized"
Cairo, CG, Qt, Wx, etc. Every specialization have this kind of constructor:

---

GraphicsContext::GraphicsContext(PlatformGraphicsContext* context)
    : m_common(createGraphicsContextPrivate())
    , m_data(new GraphicsContextPlatformPrivate)

---

What this patch intends to do is to remove the need of m_data (at least for
most platforms) since the constructor could implement a subclass of
GraphicsContextPrivate (not GraphicsContext!), set the pointer in m_common
and not need a second memory allocation (m_data).

I hope it clears things up.

M-A
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.webkit.org/pipermail/webkit-dev/attachments/20080108/f43604ea/attachment.html


More information about the webkit-dev mailing list