On Wed, Jun 27, 2012 at 5:58 AM, Thorsten Behrens < [email protected]> 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
_______________________________________________ LibreOffice mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice
