diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2016-07-01 14:00:00 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2016-07-07 22:32:38 +0200 |
commit | cb382034b061b4acd4f0fd490f42af34517a7b8d (patch) | |
tree | d8e08f2957fb6870bace66a32f7cb49c4b2260a5 /vcl/inc | |
parent | 8550366138d576123b9e66a1a7915a04026d79cd (diff) |
tdf#50613 speedup fat line drawing on linux using cairo
Drawing fat lines is slow on linux due to X11 having no direct
support for it. This leads to creating the PolyPolygon geometry
for each fat line, then tesselate and draw as trapezoids. This
is not buffered in any way and is done at each paint.
As a side effect, fat lines composed of multiple anti-aliased
lines also show errors since AA-ed edges do not add up graphically.
Since we have cairo now available it makes sense to use it
for fat line drawing, it is markedly faster despite being a software
renderer. No such gains for PolyPolygons though.
Change-Id: If4001556e2dd4c15ecf2587cad6ce1e864558f2d
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/unx/salgdi.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h index 15f6a49daadf..fb4d8445244f 100644 --- a/vcl/inc/unx/salgdi.h +++ b/vcl/inc/unx/salgdi.h @@ -267,6 +267,10 @@ public: virtual css::uno::Any GetNativeSurfaceHandle(cairo::SurfaceSharedPtr& rSurface, const basegfx::B2ISize& rSize) const override; virtual SystemFontData GetSysFontData( int nFallbackLevel ) const override; +#if ENABLE_CAIRO_CANVAS + void clipRegion(cairo_t* cr); +#endif // ENABLE_CAIRO_CANVAS + bool TryRenderCachedNativeControl(ControlCacheKey& aControlCacheKey, int nX, int nY); @@ -330,6 +334,11 @@ protected: Region pPaintRegion_; Region mpClipRegion; +#if ENABLE_CAIRO_CANVAS + vcl::Region maClipRegion; + SalColor mnPenColor; + SalColor mnFillColor; +#endif // ENABLE_CAIRO_CANVAS GC pFontGC_; // Font attributes Pixel nTextPixel_; |