[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - sw/source
Ptyl Dragon
ptyl at cloudon.com
Mon Oct 28 04:51:30 PDT 2013
sw/source/core/view/viewsh.cxx | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
New commits:
commit 9c9fb5116e80b431a92a57b829d9e90ec538f78f
Author: Ptyl Dragon <ptyl at cloudon.com>
Date: Mon Oct 28 13:50:50 2013 +0200
in progress tile rendering
Change-Id: Ie49fc47700287c3c21f234e3fece2b3afd272d24
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index e2a8bd6..fdf7577 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -162,7 +162,9 @@ void ViewShell::DLPrePaint2(const Region& rRegion)
if(mpTargetPaintWindow->GetPreRenderDevice())
{
mpBufferedOut = mpOut;
+#ifndef IOS
mpOut = &(mpTargetPaintWindow->GetTargetOutputDevice());
+#endif
}
// remember original paint MapMode for wrapped FlyFrame paints
@@ -192,11 +194,13 @@ void ViewShell::DLPostPaint2(bool bPaintFormLayer)
mPrePostPaintRegions.pop(); // clear
if(0 != mpTargetPaintWindow)
{
+#ifndef IOS
// #i74769# restore buffered OutDev
if(mpTargetPaintWindow->GetPreRenderDevice())
{
mpOut = mpBufferedOut;
}
+#endif
// #i74769# use SdrPaintWindow now direct
Imp()->GetDrawView()->EndDrawLayers(*mpTargetPaintWindow, bPaintFormLayer);
@@ -1788,16 +1792,22 @@ void touch_lo_draw_tile(void * context, int contextWidth, int contextHeight, int
MapMode aMapMode(aDevice.GetMapMode());
aMapMode.SetMapUnit(MAP_TWIP);
aMapMode.SetOrigin(Point(-tilePosX, -tilePosY));
+ // scaling
+ Fraction scaleX(contextWidth,tileWidth);
+ Fraction scaleY(contextHeight,tileHeight);
+ aMapMode.SetScaleX(scaleX);
+ aMapMode.SetScaleY(scaleY);
aDevice.SetMapMode(aMapMode);
- aDevice.SetOutputSizePixel(aDevice.PixelToLogic(Size(contextWidth, contextHeight)));
+ // resizes the virtual device so to contain the entrie context
+ aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight));
// draw
pViewShell->PaintTile(&aDevice, Rectangle(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight)));
// copy the aDevice content to mpImage
Bitmap aBitmap(aDevice.GetBitmap(aDevice.PixelToLogic(Point(0,0)), aDevice.PixelToLogic(Size(contextWidth, contextHeight))));
BitmapReadAccess * readAccess = aBitmap.AcquireReadAccess();
touch_lo_copy_buffer((void *) readAccess->GetBuffer(),
- tileWidth,
- tileHeight,
+ contextWidth,
+ contextHeight,
readAccess-> GetScanlineSize(),
context,
contextWidth,
More information about the Libreoffice-commits
mailing list