diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/headless/svpcairotextrender.cxx | 22 | ||||
-rw-r--r-- | vcl/headless/svpcairotextrender.hxx | 2 | ||||
-rw-r--r-- | vcl/headless/svpgdi.cxx | 6 | ||||
-rw-r--r-- | vcl/headless/svpinst.cxx | 3 | ||||
-rw-r--r-- | vcl/headless/svptext.cxx | 14 | ||||
-rw-r--r-- | vcl/inc/cairotextrender.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/headless/svpgdi.hxx | 3 | ||||
-rw-r--r-- | vcl/opengl/x11/salvd.cxx | 4 | ||||
-rw-r--r-- | vcl/quartz/salvd.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/bitmapex.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/gdimtf.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/virdev.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/paint.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/cairo_xlib_cairo.cxx | 9 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/salvd.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/gtk/gtksalframe.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk3/cairo_gtk3_cairo.cxx | 2 | ||||
-rw-r--r-- | vcl/win/source/gdi/salvd.cxx | 3 | ||||
-rw-r--r-- | vcl/workben/vcldemo.cxx | 2 |
20 files changed, 15 insertions, 80 deletions
diff --git a/vcl/headless/svpcairotextrender.cxx b/vcl/headless/svpcairotextrender.cxx index 06abf0ccc48a..681d65dd2e5a 100644 --- a/vcl/headless/svpcairotextrender.cxx +++ b/vcl/headless/svpcairotextrender.cxx @@ -22,13 +22,7 @@ GlyphCache& SvpCairoTextRender::getPlatformGlyphCache() cairo_t* SvpCairoTextRender::getCairoContext() { - cairo_t* pRet = mrParent.getCairoContext(); - if (!pRet) - { - mxTmpSurface = mrParent.createSimpleMask(); - pRet = SvpSalGraphics::createCairoContext(mxTmpSurface); - } - return pRet; + return mrParent.getCairoContext(); } void SvpCairoTextRender::getSurfaceOffset(double& nDX, double& nDY) @@ -42,22 +36,8 @@ void SvpCairoTextRender::clipRegion(cairo_t* cr) mrParent.clipRegion(cr); } -basebmp::BitmapDeviceSharedPtr SvpCairoTextRender::createSimpleMask() -{ - return mrParent.createSimpleMask(); -} - void SvpCairoTextRender::drawSurface(cairo_t*) { - //typically we have drawn directly to the real surface, in edge-cases of - //strange surface depths, we'll have drawn into a tmp surface, so flush - //it - if (mxTmpSurface) - { - // blend text color into target using the glyph's mask - mrParent.BlendTextColor(basebmp::Color(GetTextColor()), mxTmpSurface, basegfx::B2IPoint(0, 0)); - mxTmpSurface.reset(); - } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/headless/svpcairotextrender.hxx b/vcl/headless/svpcairotextrender.hxx index daae42c51842..1a0a1ec3b871 100644 --- a/vcl/headless/svpcairotextrender.hxx +++ b/vcl/headless/svpcairotextrender.hxx @@ -17,7 +17,6 @@ class SvpSalGraphics; class SvpCairoTextRender : public CairoTextRender { protected: - basebmp::BitmapDeviceSharedPtr mxTmpSurface; SvpSalGraphics& mrParent; public: @@ -28,7 +27,6 @@ public: virtual void getSurfaceOffset(double& nDX, double& nDY) override; virtual void clipRegion(cairo_t* cr) override; virtual void drawSurface(cairo_t* cr) override; - virtual basebmp::BitmapDeviceSharedPtr createSimpleMask() override; }; #endif diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index 05e673cda733..1fd0820e1dd4 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -122,12 +122,6 @@ namespace #endif -basebmp::BitmapDeviceSharedPtr SvpSalGraphics::createSimpleMask() const -{ - return basebmp::createBitmapDevice(m_aOrigDevice->getSize(), true, basebmp::Format::OneBitLsbGrey, - cairo_format_stride_for_width(CAIRO_FORMAT_A1, m_aOrigDevice->getSize().getX())); -} - void SvpSalGraphics::clipRegion(cairo_t* cr) { RectangleVector aRectangles; diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx index fe381fb16a04..ec7039a315e0 100644 --- a/vcl/headless/svpinst.cxx +++ b/vcl/headless/svpinst.cxx @@ -446,12 +446,9 @@ Format SvpSalInstance::getBaseBmpFormatForDeviceFormat(DeviceFormat eFormat) { case DeviceFormat::BITMASK: return Format::OneBitMsbPal; - case DeviceFormat::GRAYSCALE: - return Format::EightBitPal; default: return SVP_CAIRO_FORMAT; } - } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx index 9eb39f263b69..cb6720ca0cd9 100644 --- a/vcl/headless/svptext.cxx +++ b/vcl/headless/svptext.cxx @@ -133,18 +133,4 @@ SystemFontData SvpSalGraphics::GetSysFontData( int nFallbacklevel ) const #endif // ENABLE_CAIRO_CANVAS -void SvpSalGraphics::BlendTextColor(const basebmp::Color &rTextColor, const basebmp::BitmapDeviceSharedPtr &rAlphaMask, - const basegfx::B2IPoint &rDstPoint) -{ - // blend text color into target using the glyph's mask - const basegfx::B2IBox aSrcRect(basegfx::B2ITuple(0,0), rAlphaMask->getSize()); - const basegfx::B2IBox aClipRect(rDstPoint, rAlphaMask->getSize()); - - SvpSalGraphics::ClipUndoHandle aUndo(this); - if (isClippedSetup(aClipRect, aUndo)) - return; - - m_aDevice->drawMaskedColor(rTextColor, rAlphaMask, aSrcRect, rDstPoint, m_aClipMap); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/cairotextrender.hxx b/vcl/inc/cairotextrender.hxx index 1ff7d94b85a5..60b1b8f7468e 100644 --- a/vcl/inc/cairotextrender.hxx +++ b/vcl/inc/cairotextrender.hxx @@ -81,10 +81,6 @@ protected: virtual cairo_t* getCairoContext() = 0; virtual void getSurfaceOffset(double& nDX, double& nDY) = 0; virtual void drawSurface(cairo_t* cr) = 0; - virtual basebmp::BitmapDeviceSharedPtr createSimpleMask() - { - return basebmp::BitmapDeviceSharedPtr(); - } bool setFont( const FontSelectPattern *pEntry, int nFallbackLevel ); diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx index 5320909791ff..686301d54ea4 100644 --- a/vcl/inc/headless/svpgdi.hxx +++ b/vcl/inc/headless/svpgdi.hxx @@ -64,9 +64,6 @@ class VCL_DLLPUBLIC SvpSalGraphics : public SalGraphics public: static GlyphCache& getPlatformGlyphCache(); - void BlendTextColor(const basebmp::Color &rTextColor, const basebmp::BitmapDeviceSharedPtr &rAlphaMask, - const basegfx::B2IPoint &rDstPoint); - basebmp::BitmapDeviceSharedPtr createSimpleMask() const; void setDevice(basebmp::BitmapDeviceSharedPtr& rDevice); private: diff --git a/vcl/opengl/x11/salvd.cxx b/vcl/opengl/x11/salvd.cxx index 627661acf632..d6b8eaf4e286 100644 --- a/vcl/opengl/x11/salvd.cxx +++ b/vcl/opengl/x11/salvd.cxx @@ -44,16 +44,12 @@ X11OpenGLSalVirtualDevice::X11OpenGLSalVirtualDevice( SalGraphics* pGraphics, { assert(mpGraphics); - // TODO Do we really need the requested bit count? sal_uInt16 nBitCount; switch (eFormat) { case DeviceFormat::BITMASK: nBitCount = 1; break; - case DeviceFormat::GRAYSCALE: - nBitCount = 8; - break; default: nBitCount = pGraphics->GetBitCount(); break; diff --git a/vcl/quartz/salvd.cxx b/vcl/quartz/salvd.cxx index b7717fa0f433..c09dd449e289 100644 --- a/vcl/quartz/salvd.cxx +++ b/vcl/quartz/salvd.cxx @@ -115,9 +115,11 @@ AquaSalVirtualDevice::AquaSalVirtualDevice( AquaSalGraphics* pGraphic, long &nDX case DeviceFormat::BITMASK: mnBitmapDepth = 1; break; +#ifdef IOS case DeviceFormat::GRAYSCALE: mnBitmapDepth = 8; break; +#endif default: mnBitmapDepth = 0; break; diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx index a75afd6afbf0..f390855e7d7b 100644 --- a/vcl/source/gdi/bitmapex.cxx +++ b/vcl/source/gdi/bitmapex.cxx @@ -698,7 +698,7 @@ BitmapEx BitmapEx:: AutoScaleBitmap(BitmapEx & aBitmap, const long aStandardSize Rectangle aRect(aEmptyPoint, aStdSize ); ScopedVclPtrInstance< VirtualDevice > aVirDevice(*Application::GetDefaultDevice(), - DeviceFormat::FULLCOLOR, DeviceFormat::BITMASK); + DeviceFormat::DEFAULT, DeviceFormat::BITMASK); aVirDevice->SetOutputSizePixel( aStdSize ); aVirDevice->SetFillColor( COL_TRANSPARENT ); aVirDevice->SetLineColor( COL_TRANSPARENT ); diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index b7be53beb206..21d1f112a641 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -886,7 +886,7 @@ void GDIMetaFile::ImplAddGradientEx( GDIMetaFile& rMtf, const Gradient& rGrad ) { // Generate comment, GradientEx and Gradient actions (within DrawGradient) - ScopedVclPtrInstance< VirtualDevice > aVDev(rMapDev, DeviceFormat::FULLCOLOR); + ScopedVclPtrInstance< VirtualDevice > aVDev(rMapDev, DeviceFormat::DEFAULT); aVDev->EnableOutput( false ); GDIMetaFile aGradMtf; diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index a454704cfb3c..13906b435b01 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -2222,7 +2222,7 @@ OutputDevice* PDFWriterImpl::getReferenceDevice() { if( ! m_pReferenceDevice ) { - VclPtrInstance<VirtualDevice> pVDev(DeviceFormat::FULLCOLOR); + VclPtrInstance<VirtualDevice> pVDev(DeviceFormat::DEFAULT); m_pReferenceDevice = pVDev; diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx index 4557dc232c94..cab8fa3953f3 100644 --- a/vcl/source/gdi/virdev.cxx +++ b/vcl/source/gdi/virdev.cxx @@ -165,8 +165,6 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev, { case DeviceFormat::BITMASK: mnBitCount = 1; - case DeviceFormat::GRAYSCALE: - mnBitCount = 8; default: mnBitCount = pOutDev->GetBitCount(); break; @@ -453,7 +451,7 @@ bool VirtualDevice::SetOutputSizePixelScaleOffsetAndBuffer( const basebmp::RawMemorySharedArray &pBuffer, const basebmp::RawMemorySharedArray &pAlphaBuffer ) { if (pAlphaBuffer) - meAlphaFormat = DeviceFormat::GRAYSCALE; + meAlphaFormat = DeviceFormat::DEFAULT; if (pBuffer) { MapMode mm = GetMapMode(); diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index d2b452c3c6b6..6402639c6f47 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -1437,8 +1437,8 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP // paint metafile to VDev VclPtrInstance<VirtualDevice> pMaskedDevice(*i_pTargetOutDev, - DeviceFormat::FULLCOLOR, - DeviceFormat::FULLCOLOR); + DeviceFormat::DEFAULT, + DeviceFormat::DEFAULT); pMaskedDevice->SetOutputSizePixel( GetOutputSizePixel() ); pMaskedDevice->EnableRTL( IsRTLEnabled() ); aMtf.WindStart(); diff --git a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx index a45faa4f8061..11d4e6cc19a1 100644 --- a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx +++ b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx @@ -301,9 +301,8 @@ namespace cairo **/ int X11Surface::getDepth() const { - if( maSysData.pRenderFormat ) + if (maSysData.pRenderFormat) return static_cast<XRenderPictFormat*>(maSysData.pRenderFormat)->depth; - return -1; } @@ -315,15 +314,13 @@ namespace cairo DeviceFormat X11Surface::getFormat() const { if (!maSysData.pRenderFormat) - return DeviceFormat::FULLCOLOR; + return DeviceFormat::DEFAULT; switch (static_cast<XRenderPictFormat*>(maSysData.pRenderFormat)->depth) { case 1: return DeviceFormat::BITMASK; - case 8: - return DeviceFormat::GRAYSCALE; default: - return DeviceFormat::FULLCOLOR; + return DeviceFormat::DEFAULT; } } } diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx index d86677beb12d..97b1d3be778b 100644 --- a/vcl/unx/generic/gdi/salvd.cxx +++ b/vcl/unx/generic/gdi/salvd.cxx @@ -104,9 +104,6 @@ X11SalVirtualDevice::X11SalVirtualDevice(SalGraphics* pGraphics, long &nDX, long case DeviceFormat::BITMASK: nBitCount = 1; break; - case DeviceFormat::GRAYSCALE: - nBitCount = 8; - break; default: nBitCount = pGraphics->GetBitCount(); break; diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index 09ce9a089d81..39c34534ebd9 100644 --- a/vcl/unx/gtk/gtksalframe.cxx +++ b/vcl/unx/gtk/gtksalframe.cxx @@ -406,7 +406,7 @@ void GtkSalFrame::doKeyCallback( guint state, if (keyval == GDK_0) { fprintf( stderr, "force widget_queue_draw\n"); - gtk_widget_queue_draw (m_pFixedContainer); + gtk_widget_queue_draw(GTK_WIDGET(m_pFixedContainer)); return; } else if (keyval == GDK_1) diff --git a/vcl/unx/gtk3/cairo_gtk3_cairo.cxx b/vcl/unx/gtk3/cairo_gtk3_cairo.cxx index 25e5a0ce1264..4f6c7934af78 100644 --- a/vcl/unx/gtk3/cairo_gtk3_cairo.cxx +++ b/vcl/unx/gtk3/cairo_gtk3_cairo.cxx @@ -109,7 +109,7 @@ namespace cairo VclPtr<VirtualDevice> Gtk3Surface::createVirtualDevice() const { - return VclPtrInstance<VirtualDevice>(nullptr, Size(1, 1), DeviceFormat::FULLCOLOR); + return VclPtrInstance<VirtualDevice>(nullptr, Size(1, 1), DeviceFormat::DEFAULT); } } diff --git a/vcl/win/source/gdi/salvd.cxx b/vcl/win/source/gdi/salvd.cxx index 9b2136c0a0ca..2cfef6f5f770 100644 --- a/vcl/win/source/gdi/salvd.cxx +++ b/vcl/win/source/gdi/salvd.cxx @@ -79,9 +79,6 @@ SalVirtualDevice* WinSalInstance::CreateVirtualDevice( SalGraphics* pSGraphics, case DeviceFormat::BITMASK: nBitCount = 1; break; - case DeviceFormat::GRAYSCALE: - nBitCount = 8; - break; default: nBitCount = 0; break; diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 7e398ed12daf..768e72562e41 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -789,7 +789,7 @@ public: if ((int)eType < RENDER_AS_BITMAPEX) pNested = VclPtr<VirtualDevice>::Create(rDev).get(); else - pNested = VclPtr<VirtualDevice>::Create(rDev,DeviceFormat::FULLCOLOR,DeviceFormat::FULLCOLOR).get(); + pNested = VclPtr<VirtualDevice>::Create(rDev,DeviceFormat::DEFAULT,DeviceFormat::DEFAULT).get(); pNested->SetOutputSizePixel(r.GetSize()); Rectangle aWhole(Point(0,0), r.GetSize()); |