https://bugs.documentfoundation.org/show_bug.cgi?id=97435

            Bug ID: 97435
           Summary: Memory wasteage around OutputDevice ...
           Product: LibreOffice Online
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: LibreOffice
          Assignee: [email protected]
          Reporter: [email protected]

47                   
mpBufferDevice->SetOutputSizePixel(getOutputDevice().GetOutputSizePixel(),
false);

Allocates a buffer of this size:

1789x956

To render a 256x256 pixel square tile ;-) which seems ... curious in the
extreme, and potentially rather wasteful as well =)

Command-line is:

LO_TRACE='gdb --args' bin/run tilebench
/opt/libreoffice/master/instdir/program/ /tmp/helloworld.odt

where helloworld.odt is a small file containing "Hello World"

Backtrace is like this:

#0  0x00007fffeaa2fd48 in
sdr::overlay::OverlayManagerBuffered::ImpPrepareBufferDevice() (this=0x13ef680)
at
/data/opt/libreoffice/master/svx/source/sdr/overlay/overlaymanagerbuffered.cxx:47
#1  0x00007fffeaa30822 in
sdr::overlay::OverlayManagerBuffered::ImpSaveBackground(vcl::Region const&,
OutputDevice*) (this=0x13ef680, rRegion=..., pPreRenderDevice=0x131b410) at
/data/opt/libreoffice/master/svx/source/sdr/overlay/overlaymanagerbuffered.cxx:161
#2  0x00007fffeaa31878 in
sdr::overlay::OverlayManagerBuffered::completeRedraw(vcl::Region const&,
OutputDevice*) const (this=0x13ef680, rRegion=..., pPreRenderDevice=0x131b410)
at
/data/opt/libreoffice/master/svx/source/sdr/overlay/overlaymanagerbuffered.cxx:419
#3  0x00007fffd247d22c in (anonymous
namespace)::RenderContextGuard::~RenderContextGuard() (this=0x7ffffffbd300,
__in_chrg=<optimized out>) at
/data/opt/libreoffice/master/sw/source/core/view/viewsh.cxx:1709
#4  0x00007fffd247db20 in SwViewShell::Paint(OutputDevice&, Rectangle const&)
(this=0x12c3b10, rRenderContext=..., rRect=Rectangle = {...}) at
/data/opt/libreoffice/master/sw/source/core/view/viewsh.cxx:1848
#5  0x00007fffd1b5c3b4 in SwCursorShell::Paint(OutputDevice&, Rectangle const&)
(this=0x12c3b10, rRenderContext=..., rRect=Rectangle = {...}) at
/data/opt/libreoffice/master/sw/source/core/crsr/crsrsh.cxx:1278
#6  0x00007fffd247e183 in SwViewShell::PaintTile(VirtualDevice&, int, int, int,
int, long, long) (this=0x12c3b10, rDevice=..., contextWidth=256,
contextHeight=256, tilePosX=0, tilePosY=0, tileWidth=12474, tileHeight=17406)
at /data/opt/libreoffice/master/sw/source/core/view/viewsh.cxx:1907
#7  0x00007fffd2861235 in SwXTextDocument::paintTile(VirtualDevice&, int, int,
int, int, long, long) (this=0x7fffd8b18508, rDevice=..., nOutputWidth=256,
nOutputHeight=256, nTilePosX=0, nTilePosY=0, nTileWidth=12474,
nTileHeight=17406) at
/data/opt/libreoffice/master/sw/source/uibase/uno/unotxdoc.cxx:3111
#8  0x00007fffee7d4a50 in doc_paintTile(LibreOfficeKitDocument*, unsigned
char*, int, int, int, int, int, int) (pThis=0x1123e00, pBuffer=0x7ffffffbdaf0
'\001' <repeats 15 times>,
"\002\002\002\002\004\002\002\002\004\003\003\003\006\004\004\004\a\004\004\004\a\004\004\004\a\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b\004\004\004\b"...,
nCanvasWidth=256, nCanvasHeight=256, nTilePosX=0, nTilePosY=0,
nTileWidth=12474, nTileHeight=17406) at
/data/opt/libreoffice/master/desktop/source/lib/init.cxx:924

I assume it is picking up a window size, from a (hidden) window that is
~irrelevant to the size of the output device we should be rendering into.

I guess a more careful selection of outputdevice - not fetched from the window,
but as-passed-in would be helpful there =)

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to