Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On Wed, Jun 27, 2012 at 5:58 AM, Thorsten Behrens <
thb@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

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.