summaryrefslogtreecommitdiff
path: root/include/drawinglayer
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2016-04-29 12:30:16 +0200
committerArmin Le Grand <Armin.Le.Grand@cib.de>2016-05-06 10:11:03 +0000
commit657413b5deea11a850970f23cba2cf34a5bdf8ea (patch)
tree01d1daef3fe03fe7ad271e8efecaf189b94fe261 /include/drawinglayer
parentd324b4b3e1d32b25a6347f2f77ae921a584ee9b0 (diff)
Refactor 3D renderer to use multithreading
This try uses full 3D renderers working on the same ZBuffer target, but are capable to render one stripe per thread. This is rougher in granularity and uses multiple cores better than the first try (see gerrit 24393) which was too fine-granular being based on scanline render parallelization. SecUred some more classes based on SdrPrimitive3D for multi- theaded usage (places where local buffered stuff is done) Change-Id: I4ddd5885ad41dd6432d0695e528818a86e427bfd Reviewed-on: https://gerrit.libreoffice.org/24538 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Diffstat (limited to 'include/drawinglayer')
-rw-r--r--include/drawinglayer/processor3d/zbufferprocessor3d.hxx18
1 files changed, 10 insertions, 8 deletions
diff --git a/include/drawinglayer/processor3d/zbufferprocessor3d.hxx b/include/drawinglayer/processor3d/zbufferprocessor3d.hxx
index 8e3f6d4f3ac1..0f58a7f1f0ab 100644
--- a/include/drawinglayer/processor3d/zbufferprocessor3d.hxx
+++ b/include/drawinglayer/processor3d/zbufferprocessor3d.hxx
@@ -56,7 +56,7 @@ namespace drawinglayer
{
private:
/// the raster target, a Z-Buffer
- basegfx::BZPixelRaster* mpBZPixelRaster;
+ basegfx::BZPixelRaster& mrBZPixelRaster;
/// inverse of EyeToView for rasterconversion with evtl. Phong shading
basegfx::B3DHomMatrix maInvEyeToView;
@@ -74,6 +74,9 @@ namespace drawinglayer
*/
std::vector< RasterPrimitive3D >* mpRasterPrimitive3Ds;
+ sal_uInt32 mnStartLine;
+ sal_uInt32 mnStopLine;
+
// rasterconversions for filled and non-filled polygons
virtual void rasterconvertB3DPolygon(const attribute::MaterialAttribute3D& rMaterial, const basegfx::B3DPolygon& rHairline) const override;
@@ -82,19 +85,18 @@ namespace drawinglayer
public:
ZBufferProcessor3D(
const geometry::ViewInformation3D& rViewInformation3D,
- const geometry::ViewInformation2D& rViewInformation2D,
const attribute::SdrSceneAttribute& rSdrSceneAttribute,
const attribute::SdrLightingAttribute& rSdrLightingAttribute,
- double fSizeX,
- double fSizeY,
const basegfx::B2DRange& rVisiblePart,
- sal_uInt16 nAntiAlialize);
+ sal_uInt16 nAntiAlialize,
+ double fFullViewSizeX,
+ double fFullViewSizeY,
+ basegfx::BZPixelRaster& rBZPixelRaster,
+ sal_uInt32 nStartLine,
+ sal_uInt32 nStopLine);
virtual ~ZBufferProcessor3D();
void finish();
-
- /// get the result as bitmapEx
- BitmapEx getBitmapEx() const;
};
}
}