diff options
-rw-r--r-- | include/vcl/outdev.hxx | 1 | ||||
-rw-r--r-- | include/vcl/print.hxx | 1 | ||||
-rw-r--r-- | include/vcl/virdev.hxx | 3 | ||||
-rw-r--r-- | include/vcl/window.hxx | 5 | ||||
-rw-r--r-- | vcl/source/gdi/outdev4.cxx | 3 | ||||
-rw-r--r-- | vcl/source/gdi/print.cxx | 5 | ||||
-rw-r--r-- | vcl/source/gdi/virdev.cxx | 5 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 8 |
8 files changed, 27 insertions, 4 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 363cdbf62d90..56aa0739c04f 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -805,6 +805,7 @@ protected: const Point& rSrcPtPixel, const Size& rSrcSizePixel ); virtual long ImplGetGradientStepCount( long nMinRect ); + virtual bool UsePolyPolygonForComplexGradient() = 0; /** Transform and draw a bitmap directly diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx index 0271f0bcac1f..d70e7c025c01 100644 --- a/include/vcl/print.hxx +++ b/include/vcl/print.hxx @@ -274,6 +274,7 @@ public: protected: long ImplGetGradientStepCount( long nMinRect ) SAL_OVERRIDE; + virtual bool UsePolyPolygonForComplexGradient() SAL_OVERRIDE; void ScaleBitmap ( Bitmap&, SalTwoRect& ) SAL_OVERRIDE { }; public: diff --git a/include/vcl/virdev.hxx b/include/vcl/virdev.hxx index 0436b5dc7161..b2a29be735bb 100644 --- a/include/vcl/virdev.hxx +++ b/include/vcl/virdev.hxx @@ -140,6 +140,9 @@ public: private: SAL_DLLPRIVATE void ImplSetReferenceDevice( RefDevMode, sal_Int32 i_nDPIX, sal_Int32 i_nDPIY ); +protected: + virtual bool UsePolyPolygonForComplexGradient() SAL_OVERRIDE; + }; #endif // INCLUDED_VCL_VIRDEV_HXX diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 5751489fe1c7..a527a8f2be76 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -579,8 +579,9 @@ protected: virtual sal_uInt16 getDefaultAccessibleRole() const; virtual OUString getDefaultAccessibleName() const; - virtual void CopyAreaFinal( SalTwoRect& aPosAry, sal_uInt32 nFlags) SAL_OVERRIDE; - virtual void ClipToPaintRegion( Rectangle& rDstRect ) SAL_OVERRIDE; + virtual void CopyAreaFinal( SalTwoRect& aPosAry, sal_uInt32 nFlags) SAL_OVERRIDE; + virtual void ClipToPaintRegion( Rectangle& rDstRect ) SAL_OVERRIDE; + virtual bool UsePolyPolygonForComplexGradient() SAL_OVERRIDE; public: bool HasMirroredGraphics() const SAL_OVERRIDE; diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx index c3873b6adcb4..4d23620013c4 100644 --- a/vcl/source/gdi/outdev4.cxx +++ b/vcl/source/gdi/outdev4.cxx @@ -372,7 +372,6 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect, // as we will get wrong results if we output multiple times on top of each other. // Also for printers always use PolyPolygon, as not all printers // can print polygons on top of each other. - // Also virtual devices are excluded, as some drivers are too slow. boost::scoped_ptr<PolyPolygon> pPolyPoly; Rectangle aRect; @@ -393,7 +392,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect, rGradient.GetBoundRect( rRect, aRect, aCenter ); - if( (meRasterOp != ROP_OVERPAINT) || (meOutDevType != OUTDEV_WINDOW) || bMtf ) + if ( UsePolyPolygonForComplexGradient() || bMtf ) pPolyPoly.reset(new PolyPolygon( 2 )); long nMinRect = std::min( aRect.GetWidth(), aRect.GetHeight() ); diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index c83757b51a06..f6ebc67f3bc0 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -1863,4 +1863,9 @@ void Printer::updatePrinters() } } +bool Printer::UsePolyPolygonForComplexGradient() +{ + return true; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx index df30533616d1..1b3fba203211 100644 --- a/vcl/source/gdi/virdev.cxx +++ b/vcl/source/gdi/virdev.cxx @@ -543,6 +543,11 @@ sal_uInt16 VirtualDevice::GetAlphaBitCount() const return 0; } +bool VirtualDevice::UsePolyPolygonForComplexGradient() +{ + return true; +} + void VirtualDevice::Compat_ZeroExtleadBug() { meRefDevMode = (sal_uInt8)meRefDevMode | REFDEV_FORCE_ZERO_EXTLEAD; diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 6ae570051d96..5bed7e135b94 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -9840,4 +9840,12 @@ Selection Window::GetSurroundingTextSelection() const return Selection( 0, 0 ); } +bool Window::UsePolyPolygonForComplexGradient() +{ + if ( meRasterOp != ROP_OVERPAINT ) + return true; + + return false; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |