Kaydet (Commit) 4442d226 authored tarafından Noel Grandin's avatar Noel Grandin

convert OutDevSupportType to scoped enum

Change-Id: I7a1e4448dfff0ea6909149533d228829d980796c
üst 619d5fce
......@@ -95,7 +95,7 @@ class SVT_DLLPUBLIC SvtOptionsDrawinglayer
sal_uInt32 GetMaximumPaperBottomMargin() const;
// #i95644# helper to check if AA is allowed on this system. Currently, for WIN its disabled
// and OutDevSupport_TransparentRect is checked (this hits XRenderExtension, e.g.
// and OutDevSupportType::TransparentRect is checked (this hits XRenderExtension, e.g.
// currently for SunRay as long as not supported there)
bool IsAAPossibleOnThisSystem() const;
......
......@@ -81,7 +81,7 @@ enum class FontHintStyle { NONE, Slight, Medium, Full };
typedef sal_uInt32 sal_UCS4; // TODO: this should be moved to rtl
enum OutDevSupportType { OutDevSupport_TransparentRect, OutDevSupport_B2DDraw };
enum class OutDevSupportType { TransparentRect, B2DDraw };
struct ItalicMatrix
{
......
......@@ -677,7 +677,7 @@ bool SvtOptionsDrawinglayer_Impl::IsAAPossibleOnThisSystem() const
#endif
// check XRenderExtension
if(m_bAllowAA && !Application::GetDefaultDevice()->SupportsOperation( OutDevSupport_TransparentRect ))
if(m_bAllowAA && !Application::GetDefaultDevice()->SupportsOperation( OutDevSupportType::TransparentRect ))
{
pThat->m_bAllowAA = false;
}
......
......@@ -80,7 +80,7 @@ namespace sdr
return OverlayType::Invert;
}
if(!pOut->SupportsOperation(OutDevSupport_TransparentRect))
if(!pOut->SupportsOperation(OutDevSupportType::TransparentRect))
{
// not possible when no fast transparence paint is supported on the system
return OverlayType::Invert;
......
......@@ -1400,8 +1400,8 @@ bool SvpSalGraphics::supportsOperation(OutDevSupportType eType) const
{
switch (eType)
{
case OutDevSupport_TransparentRect:
case OutDevSupport_B2DDraw:
case OutDevSupportType::TransparentRect:
case OutDevSupportType::B2DDraw:
return true;
}
return false;
......
......@@ -1892,8 +1892,8 @@ bool AquaSalGraphics::supportsOperation( OutDevSupportType eType ) const
bool bRet = false;
switch( eType )
{
case OutDevSupport_TransparentRect:
case OutDevSupport_B2DDraw:
case OutDevSupportType::TransparentRect:
case OutDevSupportType::B2DDraw:
bRet = true;
break;
default:
......
......@@ -115,7 +115,7 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt )
// #i101598# support AA and snap for lines, too
if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw)
&& mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
&& mpGraphics->supportsOperation(OutDevSupportType::B2DDraw)
&& ROP_OVERPAINT == GetRasterOp()
&& IsLineColor())
{
......@@ -159,7 +159,7 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt )
void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const LineInfo& rInfo )
{
const bool bTryAA((mnAntialiasing & AntialiasingFlags::EnableB2dDraw)
&& mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
&& mpGraphics->supportsOperation(OutDevSupportType::B2DDraw)
&& ROP_OVERPAINT == GetRasterOp()
&& IsLineColor());
basegfx::B2DPolyPolygon aFillPolyPolygon;
......
......@@ -64,7 +64,7 @@ void OutputDevice::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly )
// use b2dpolygon drawing if possible
if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) &&
mpGraphics->supportsOperation(OutDevSupport_B2DDraw) &&
mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) &&
ROP_OVERPAINT == GetRasterOp() &&
(IsLineColor() || IsFillColor()))
{
......@@ -177,7 +177,7 @@ void OutputDevice::DrawPolygon( const tools::Polygon& rPoly )
// use b2dpolygon drawing if possible
if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) &&
mpGraphics->supportsOperation(OutDevSupport_B2DDraw) &&
mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) &&
ROP_OVERPAINT == GetRasterOp() &&
(IsLineColor() || IsFillColor()))
{
......@@ -280,7 +280,7 @@ void OutputDevice::ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyP
InitFillColor();
if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) &&
mpGraphics->supportsOperation(OutDevSupport_B2DDraw) &&
mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) &&
ROP_OVERPAINT == GetRasterOp() &&
(IsLineColor() || IsFillColor()))
{
......
......@@ -213,7 +213,7 @@ void OutputDevice::DrawPolyLine( const basegfx::B2DPolygon& rB2DPolygon,
InitFillColor();
const bool bTryAA((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) &&
mpGraphics->supportsOperation(OutDevSupport_B2DDraw) &&
mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) &&
ROP_OVERPAINT == GetRasterOp() &&
IsLineColor());
......@@ -313,7 +313,7 @@ bool OutputDevice::DrawPolyLineDirect( const basegfx::B2DPolygon& rB2DPolygon,
const bool bTryAA( bBypassAACheck ||
((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) &&
mpGraphics->supportsOperation(OutDevSupport_B2DDraw) &&
mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) &&
ROP_OVERPAINT == GetRasterOp() &&
IsLineColor()));
......
......@@ -233,7 +233,7 @@ void OutputDevice::DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly,
InitFillColor();
if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) &&
mpGraphics->supportsOperation(OutDevSupport_B2DDraw) &&
mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) &&
(ROP_OVERPAINT == GetRasterOp()) )
{
// b2dpolygon support not implemented yet on non-UNX platforms
......@@ -305,7 +305,7 @@ bool OutputDevice::DrawTransparentNatively ( const tools::PolyPolygon& rPolyPoly
static const char* pDisableNative = getenv( "SAL_DISABLE_NATIVE_ALPHA");
if( !pDisableNative &&
mpGraphics->supportsOperation( OutDevSupport_B2DDraw )
mpGraphics->supportsOperation( OutDevSupportType::B2DDraw )
#if defined UNX && ! defined MACOSX && ! defined IOS
&& GetBitCount() > 8
#endif
......
......@@ -254,8 +254,8 @@ bool X11SalGraphics::supportsOperation( OutDevSupportType eType ) const
bool bRet = false;
switch( eType )
{
case OutDevSupport_TransparentRect:
case OutDevSupport_B2DDraw:
case OutDevSupportType::TransparentRect:
case OutDevSupportType::B2DDraw:
{
XRenderPeer& rPeer = XRenderPeer::GetInstance();
const SalDisplay* pSalDisp = GetDisplay();
......
......@@ -436,7 +436,7 @@ void GenPspGraphics::drawPolyPolygon( sal_uInt32 nPoly,
bool GenPspGraphics::drawPolyPolygon( const basegfx::B2DPolyPolygon&, double /*fTransparency*/ )
{
// TODO: implement and advertise OutDevSupport_B2DDraw support
// TODO: implement and advertise OutDevSupportType::B2DDraw support
return false;
}
......
......@@ -45,10 +45,10 @@ bool WinSalGraphics::supportsOperation( OutDevSupportType eType ) const
switch( eType )
{
case OutDevSupport_TransparentRect:
case OutDevSupportType::TransparentRect:
bRet = mbVirDev || mbWindow;
break;
case OutDevSupport_B2DDraw:
case OutDevSupportType::B2DDraw:
bRet = bAllowForTest;
break;
default: break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment