diff options
author | Armin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de> | 2024-08-30 19:44:52 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@me.com> | 2024-09-02 11:30:58 +0200 |
commit | 6386a1612042ea8ccec3913ce56f0e2d119e739f (patch) | |
tree | 62b201f19f4b578dd101c66cb1b53b8f430cd4f3 /drawinglayer/source | |
parent | 32ce555c9daff2d4044c041e220fde44cf4aff67 (diff) |
CiaroSDPR: Small optimizations
Change-Id: Iecfec4668a465cc2fd3687d66f67de6e0d1e33c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172687
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'drawinglayer/source')
-rw-r--r-- | drawinglayer/source/processor2d/cairopixelprocessor2d.cxx | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/drawinglayer/source/processor2d/cairopixelprocessor2d.cxx b/drawinglayer/source/processor2d/cairopixelprocessor2d.cxx index f8a786fa7870..ba8d5fb73261 100644 --- a/drawinglayer/source/processor2d/cairopixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/cairopixelprocessor2d.cxx @@ -950,12 +950,9 @@ void CairoPixelProcessor2D::paintBitmapAlpha(const BitmapEx& rBitmapEx, // correctly initialized local ViewInformation basegfx::B2DPolygon aPolygon(basegfx::utils::createUnitPolygon()); - rtl::Reference<primitive2d::PolyPolygonColorPrimitive2D> xTemp( - new primitive2d::PolyPolygonColorPrimitive2D(basegfx::B2DPolyPolygon(aPolygon), - aModifiedColor)); + // draw directly, done + paintPolyPoylgonRGBA(basegfx::B2DPolyPolygon(aPolygon), aModifiedColor, fTransparency); - // draw as Polygon, done - processPolyPolygonColorPrimitive2D(*xTemp); return; } } @@ -1969,23 +1966,9 @@ void CairoPixelProcessor2D::processFillGraphicPrimitive2D( // local primitive, that is not part of DisplayInfo yet aPolygon.transform(rFillGraphicPrimitive2D.getTransformation()); - if (rFillGraphicPrimitive2D.hasTransparency()) - { - rtl::Reference<primitive2d::PolyPolygonRGBAPrimitive2D> aTemp( - new primitive2d::PolyPolygonRGBAPrimitive2D( - basegfx::B2DPolyPolygon(aPolygon), aModifiedColor, - rFillGraphicPrimitive2D.getTransparency())); - // draw as colored and transparent Polygon, done - processPolyPolygonRGBAPrimitive2D(*aTemp); - } - else - { - rtl::Reference<primitive2d::PolyPolygonColorPrimitive2D> aTemp( - new primitive2d::PolyPolygonColorPrimitive2D(basegfx::B2DPolyPolygon(aPolygon), - aModifiedColor)); - // draw as colored Polygon, done - processPolyPolygonColorPrimitive2D(*aTemp); - } + // draw directly + paintPolyPoylgonRGBA(basegfx::B2DPolyPolygon(aPolygon), aModifiedColor, + rFillGraphicPrimitive2D.getTransparency()); return; } @@ -2542,7 +2525,6 @@ void CairoPixelProcessor2D::processFillGradientPrimitive2D_square_rect( } // cleanup - // cairo_pattern_destroy(pPattern); cairo_restore(mpRT); } |