[GSOC] Removing avmedia dependency in drawinglayer

Rafael Dominguez venccsralph at gmail.com
Thu Jun 28 06:08:34 PDT 2012


On Wed, Jun 27, 2012 at 5:58 AM, Thorsten Behrens <
thb at documentfoundation.org> wrote:

> Rafael Dominguez wrote:
> > > Oops my bad, heres the patch attached
> >
> Hi Rafael,
>
> nice improvement - two nits though:
>
> > @@ -65,6 +67,8 @@ namespace drawinglayer
> >              /// discrete border (in 'pixels')
> >              sal_uInt32
>  mnDiscreteBorder;
> >
> > +            const Graphic                               *mpSnapshot;
> > +
> >
> Parent classes of MediaPrimitive2D derive from boost::noncopyable -
> that means you don't have to worry about having to modify mpSnapshot,
> which in turn means it could be const Graphic& instead.
>
> But it's even easier, since Graphic has copy-on-write behaviour -
> you can simply hold a Graphic by value in your primitive, it only
> contains a cheap ptr to an impl class, that gets, if necessary,
> copied & duplicated if you modify one of the many shared copies.
>
> (many bulky objects in LibO have that behaviour, including bitmaps,
> polygons, and metafiles (sorta))
>
> Cheers,
>
> -- Thorsten
>

Thanks for the input, i took your advice and changed it, gonna push it to
my branch then
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120628/631c3113/attachment.html>


More information about the LibreOffice mailing list