LibreOffice Module vcl (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
AquaSkiaSalGraphicsImpl Class Referencefinal

#include <gdiimpl.hxx>

Inheritance diagram for AquaSkiaSalGraphicsImpl:
[legend]
Collaboration diagram for AquaSkiaSalGraphicsImpl:
[legend]

Public Member Functions

 AquaSkiaSalGraphicsImpl (AquaSalGraphics &rParent, AquaSharedAttributes &rShared)
 
virtual ~AquaSkiaSalGraphicsImpl () override
 
virtual void freeResources () override
 
virtual void UpdateGeometryProvider (SalGeometryProvider *provider) override
 
virtual bool drawNativeControl (ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue) override
 
virtual void drawTextLayout (const GenericSalLayout &layout) override
 
virtual void Flush () override
 
virtual void Flush (const tools::Rectangle &) override
 
virtual void WindowBackingPropertiesChanged () override
 
- Public Member Functions inherited from SkiaSalGraphicsImpl
 SkiaSalGraphicsImpl (SalGraphics &pParent, SalGeometryProvider *pProvider)
 
virtual ~SkiaSalGraphicsImpl () override
 
virtual void Init () override
 
virtual void DeInit () override
 
virtual OUString getRenderBackendName () const override
 
const vcl::RegiongetClipRegion () const
 
virtual void setClipRegion (const vcl::Region &) override
 
virtual sal_uInt16 GetBitCount () const override
 
virtual tools::Long GetGraphicsWidth () const override
 
virtual void ResetClipRegion () override
 
virtual void SetLineColor () override
 
virtual void SetLineColor (Color nColor) override
 
virtual void SetFillColor () override
 
virtual void SetFillColor (Color nColor) override
 
virtual void SetXORMode (bool bSet, bool bInvertOnly) override
 
virtual void SetROPLineColor (SalROPColor nROPColor) override
 
virtual void SetROPFillColor (SalROPColor nROPColor) override
 
virtual void drawPixel (tools::Long nX, tools::Long nY) override
 
virtual void drawPixel (tools::Long nX, tools::Long nY, Color nColor) override
 
virtual void drawLine (tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2) override
 
virtual void drawRect (tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override
 
virtual void drawPolyLine (sal_uInt32 nPoints, const Point *pPtAry) override
 
virtual void drawPolygon (sal_uInt32 nPoints, const Point *pPtAry) override
 
virtual void drawPolyPolygon (sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point **pPtAry) override
 
virtual bool drawPolyPolygon (const basegfx::B2DHomMatrix &rObjectToDevice, const basegfx::B2DPolyPolygon &, double fTransparency) override
 
virtual bool drawPolyLine (const basegfx::B2DHomMatrix &rObjectToDevice, const basegfx::B2DPolygon &, double fTransparency, double fLineWidth, const std::vector< double > *pStroke, basegfx::B2DLineJoin, css::drawing::LineCap, double fMiterMinimumAngle, bool bPixelSnapHairline) override
 
virtual bool drawPolyLineBezier (sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry) override
 
virtual bool drawPolygonBezier (sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry) override
 
virtual bool drawPolyPolygonBezier (sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point *const *pPtAry, const PolyFlags *const *pFlgAry) override
 
virtual void copyArea (tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight, bool bWindowInvalidate) override
 
virtual void copyBits (const SalTwoRect &rPosAry, SalGraphics *pSrcGraphics) override
 
virtual bool blendBitmap (const SalTwoRect &, const SalBitmap &rBitmap) override
 
virtual bool blendAlphaBitmap (const SalTwoRect &, const SalBitmap &rSrcBitmap, const SalBitmap &rMaskBitmap, const SalBitmap &rAlphaBitmap) override
 
virtual void drawBitmap (const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap) override
 
virtual void drawBitmap (const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, const SalBitmap &rMaskBitmap) override
 
virtual void drawMask (const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, Color nMaskColor) override
 
virtual std::shared_ptr< SalBitmapgetBitmap (tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override
 
virtual Color getPixel (tools::Long nX, tools::Long nY) override
 
virtual void invert (tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags) override
 
virtual void invert (sal_uInt32 nPoints, const Point *pPtAry, SalInvert nFlags) override
 
virtual bool drawEPS (tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void *pPtr, sal_uInt32 nSize) override
 
virtual bool drawAlphaBitmap (const SalTwoRect &, const SalBitmap &rSourceBitmap, const SalBitmap &rAlphaBitmap) override
 Render bitmap with alpha channel. More...
 
virtual bool drawTransformedBitmap (const basegfx::B2DPoint &rNull, const basegfx::B2DPoint &rX, const basegfx::B2DPoint &rY, const SalBitmap &rSourceBitmap, const SalBitmap *pAlphaBitmap, double fAlpha) override
 draw transformed bitmap (maybe with alpha) where Null, X, Y define the coordinate system More...
 
virtual bool hasFastDrawTransformedBitmap () const override
 
virtual bool drawAlphaRect (tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt8 nTransparency) override
 Render solid rectangle with given transparency. More...
 
virtual bool drawGradient (const tools::PolyPolygon &rPolygon, const Gradient &rGradient) override
 
virtual bool implDrawGradient (const basegfx::B2DPolyPolygon &rPolyPolygon, const SalGradient &rGradient) override
 
virtual bool supportsOperation (OutDevSupportType eType) const override
 
void dump (const char *file) const
 
void drawBitmap (const SalTwoRect &rPosAry, const SkiaSalBitmap &bitmap, SkBlendMode blendMode=SkBlendMode::kSrcOver)
 
void drawImage (const SalTwoRect &rPosAry, const sk_sp< SkImage > &aImage, int srcScaling=1, SkBlendMode eBlendMode=SkBlendMode::kSrcOver)
 
void drawShader (const SalTwoRect &rPosAry, const sk_sp< SkShader > &shader, SkBlendMode blendMode=SkBlendMode::kSrcOver)
 
void drawGenericLayout (const GenericSalLayout &layout, Color textColor, const SkFont &font, const SkFont &verticalFont)
 
- Public Member Functions inherited from SalGraphicsImpl
void setAntiAlias (bool bNew)
 
bool getAntiAlias () const
 
 SalGraphicsImpl ()
 
virtual ~SalGraphicsImpl ()
 
virtual void Init ()=0
 
virtual void DeInit ()
 
virtual void freeResources ()=0
 
virtual OUString getRenderBackendName () const =0
 
virtual void setClipRegion (const vcl::Region &)=0
 
virtual sal_uInt16 GetBitCount () const =0
 
virtual tools::Long GetGraphicsWidth () const =0
 
virtual void ResetClipRegion ()=0
 
virtual void SetLineColor ()=0
 
virtual void SetLineColor (Color nColor)=0
 
virtual void SetFillColor ()=0
 
virtual void SetFillColor (Color nColor)=0
 
virtual void SetXORMode (bool bSet, bool bInvertOnly)=0
 
virtual void SetROPLineColor (SalROPColor nROPColor)=0
 
virtual void SetROPFillColor (SalROPColor nROPColor)=0
 
virtual void drawPixel (tools::Long nX, tools::Long nY)=0
 
virtual void drawPixel (tools::Long nX, tools::Long nY, Color nColor)=0
 
virtual void drawLine (tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2)=0
 
virtual void drawRect (tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight)=0
 
virtual void drawPolyLine (sal_uInt32 nPoints, const Point *pPtAry)=0
 
virtual void drawPolygon (sal_uInt32 nPoints, const Point *pPtAry)=0
 
virtual void drawPolyPolygon (sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point **pPtAry)=0
 
virtual bool drawPolyPolygon (const basegfx::B2DHomMatrix &rObjectToDevice, const basegfx::B2DPolyPolygon &, double fTransparency)=0
 
virtual bool drawPolyLine (const basegfx::B2DHomMatrix &rObjectToDevice, const basegfx::B2DPolygon &, double fTransparency, double fLineWidth, const std::vector< double > *pStroke, basegfx::B2DLineJoin, css::drawing::LineCap, double fMiterMinimumAngle, bool bPixelSnapHairline)=0
 
virtual bool drawPolyLineBezier (sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry)=0
 
virtual bool drawPolygonBezier (sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry)=0
 
virtual bool drawPolyPolygonBezier (sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point *const *pPtAry, const PolyFlags *const *pFlgAry)=0
 
virtual void copyArea (tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight, bool bWindowInvalidate)=0
 
virtual void copyBits (const SalTwoRect &rPosAry, SalGraphics *pSrcGraphics)=0
 
virtual void drawBitmap (const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap)=0
 
virtual void drawBitmap (const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, const SalBitmap &rMaskBitmap)=0
 
virtual void drawMask (const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, Color nMaskColor)=0
 
virtual std::shared_ptr< SalBitmapgetBitmap (tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight)=0
 
virtual Color getPixel (tools::Long nX, tools::Long nY)=0
 
virtual void invert (tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags)=0
 
virtual void invert (sal_uInt32 nPoints, const Point *pPtAry, SalInvert nFlags)=0
 
virtual bool drawEPS (tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void *pPtr, sal_uInt32 nSize)=0
 
virtual bool blendBitmap (const SalTwoRect &, const SalBitmap &rBitmap)=0
 
virtual bool blendAlphaBitmap (const SalTwoRect &, const SalBitmap &rSrcBitmap, const SalBitmap &rMaskBitmap, const SalBitmap &rAlphaBitmap)=0
 
virtual bool drawAlphaBitmap (const SalTwoRect &, const SalBitmap &rSourceBitmap, const SalBitmap &rAlphaBitmap)=0
 
virtual bool drawTransformedBitmap (const basegfx::B2DPoint &rNull, const basegfx::B2DPoint &rX, const basegfx::B2DPoint &rY, const SalBitmap &rSourceBitmap, const SalBitmap *pAlphaBitmap, double fAlpha)=0
 
virtual bool hasFastDrawTransformedBitmap () const =0
 
virtual bool drawAlphaRect (tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt8 nTransparency)=0
 
virtual bool drawGradient (const tools::PolyPolygon &rPolygon, const Gradient &rGradient)=0
 
virtual bool implDrawGradient (basegfx::B2DPolyPolygon const &rPolyPolygon, SalGradient const &rGradient)=0
 
virtual bool supportsOperation (OutDevSupportType eType) const =0
 
- Public Member Functions inherited from AquaGraphicsBackendBase
virtual ~AquaGraphicsBackendBase ()=0
 
AquaSharedAttributesGetShared ()
 
SalGraphicsImplGetImpl ()
 
virtual void UpdateGeometryProvider (SalGeometryProvider *)
 
virtual bool drawNativeControl (ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue)=0
 
virtual void drawTextLayout (const GenericSalLayout &layout)=0
 
virtual void Flush ()
 
virtual void Flush (const tools::Rectangle &)
 
virtual void WindowBackingPropertiesChanged ()
 

Static Public Member Functions

static void prepareSkia ()
 

Private Member Functions

virtual int getWindowScaling () const override
 
virtual void createWindowSurfaceInternal (bool forceRaster=false) override
 
virtual void flushSurfaceToWindowContext () override
 
void flushSurfaceToScreenCG ()
 

Static Private Attributes

static sk_sp< SkFontMgr > fontManager
 

Additional Inherited Members

- Protected Types inherited from SkiaSalGraphicsImpl
enum class  XorMode {
  None ,
  Invert ,
  Xor
}
 
using DirectImage = SkiaHelper::DirectImage
 
- Protected Member Functions inherited from SkiaSalGraphicsImpl
void preDraw ()
 
void postDraw ()
 
SkCanvas * getDrawCanvas ()
 
void flushDrawing ()
 
virtual void createSurface ()
 
void checkSurface ()
 
void destroySurface ()
 
virtual bool avoidRecreateByResize () const
 
void createWindowSurface (bool forceRaster=false)
 
virtual void createWindowSurfaceInternal (bool forceRaster=false)=0
 
void createOffscreenSurface ()
 
virtual void flushSurfaceToWindowContext ()
 
void privateDrawAlphaRect (tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, double nTransparency, bool blockAA=false)
 
void privateCopyBits (const SalTwoRect &rPosAry, SkiaSalGraphicsImpl *src)
 
void setProvider (SalGeometryProvider *provider)
 
bool isOffscreen () const
 
bool isGPU () const
 
void invert (basegfx::B2DPolygon const &rPoly, SalInvert eFlags)
 
void performFlush ()
 
void scheduleFlush ()
 
int GetWidth () const
 
int GetHeight () const
 
virtual int getWindowScaling () const
 
void addUpdateRegion (const SkRect &rect)
 
void setCanvasScalingAndClipping ()
 
void resetCanvasScalingAndClipping ()
 
sk_sp< SkImage > mergeCacheBitmaps (const SkiaSalBitmap &bitmap, const SkiaSalBitmap *alphaBitmap, const Size &targetSize)
 
void checkPendingDrawing ()
 
bool delayDrawPolyPolygon (const basegfx::B2DPolyPolygon &polygon, double transparency)
 
void performDrawPolyPolygon (const basegfx::B2DPolyPolygon &polygon, double transparency, bool useAA)
 
BmpScaleFlag goodScalingQuality () const
 
SkSamplingOptions makeSamplingOptions (const SalTwoRect &rPosAry, int scalingFactor, int srcScalingFactor=1)
 
SkSamplingOptions makeSamplingOptions (const SkMatrix &matrix, int scalingFactor)
 
SkPaint makePaintInternal () const
 
SkPaint makeLinePaint (double transparency=0) const
 
SkPaint makeFillPaint (double transparency=0) const
 
SkPaint makeBitmapPaint () const
 
SkPaint makeGradientPaint () const
 
SkPaint makeTextPaint (std::optional< Color > color) const
 
SkPaint makePixelPaint (std::optional< Color > color) const
 
void windowBackingPropertiesChanged ()
 
- Protected Member Functions inherited from AquaGraphicsBackendBase
 AquaGraphicsBackendBase (AquaSharedAttributes &rShared, SalGraphicsImpl *impl)
 
- Static Protected Member Functions inherited from SkiaSalGraphicsImpl
static void setCanvasClipRegion (SkCanvas *canvas, const vcl::Region &region)
 
static OString makeCachedImageKey (const SkiaSalBitmap &bitmap, const SkiaSalBitmap *alphaBitmap, const Size &targetSize, DirectImage bitmapType, DirectImage alphaBitmapType)
 
static constexpr SkScalar toSkX (tools::Long x)
 
static constexpr SkScalar toSkY (tools::Long y)
 
- Static Protected Member Functions inherited from AquaGraphicsBackendBase
static bool performDrawNativeControl (ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, CGContextRef context, AquaSalFrame *mpFrame)
 
- Protected Attributes inherited from SkiaSalGraphicsImpl
SalGraphicsmParent
 
SalGeometryProvidermProvider
 Pointer to the SalFrame or SalVirtualDevice. More...
 
sk_sp< SkSurface > mSurface
 
std::unique_ptr< sk_app::WindowContext > mWindowContext
 
bool mIsGPU
 
SkIRect mDirtyRect
 
vcl::Region mClipRegion
 
std::optional< ColormoLineColor
 
std::optional< ColormoFillColor
 
XorMode mXorMode
 
std::unique_ptr< SkiaFlushIdlemFlush
 
LastPolyPolygonInfo mLastPolyPolygonInfo
 
int mScaling
 
bool mInWindowBackingPropertiesChanged
 
- Protected Attributes inherited from AquaGraphicsBackendBase
AquaSharedAttributesmrShared
 
- Static Protected Attributes inherited from SkiaSalGraphicsImpl
static constexpr SkScalar toSkXYFix = SkScalar(0.005)
 
static int pendingOperationsToFlush = 0
 

Detailed Description

Definition at line 22 of file osx/gdiimpl.hxx.

Constructor & Destructor Documentation

◆ AquaSkiaSalGraphicsImpl()

AquaSkiaSalGraphicsImpl::AquaSkiaSalGraphicsImpl ( AquaSalGraphics rParent,
AquaSharedAttributes rShared 
)

◆ ~AquaSkiaSalGraphicsImpl()

virtual AquaSkiaSalGraphicsImpl::~AquaSkiaSalGraphicsImpl ( )
overridevirtual

Member Function Documentation

◆ createWindowSurfaceInternal()

virtual void AquaSkiaSalGraphicsImpl::createWindowSurfaceInternal ( bool  forceRaster = false)
overrideprivatevirtual

Implements SkiaSalGraphicsImpl.

◆ drawNativeControl()

virtual bool AquaSkiaSalGraphicsImpl::drawNativeControl ( ControlType  nType,
ControlPart  nPart,
const tools::Rectangle rControlRegion,
ControlState  nState,
const ImplControlValue aValue 
)
overridevirtual

◆ drawTextLayout()

virtual void AquaSkiaSalGraphicsImpl::drawTextLayout ( const GenericSalLayout layout)
overridevirtual

◆ Flush() [1/2]

virtual void AquaSkiaSalGraphicsImpl::Flush ( )
overridevirtual

Reimplemented from AquaGraphicsBackendBase.

◆ Flush() [2/2]

virtual void AquaSkiaSalGraphicsImpl::Flush ( const tools::Rectangle )
overridevirtual

Reimplemented from AquaGraphicsBackendBase.

◆ flushSurfaceToScreenCG()

void AquaSkiaSalGraphicsImpl::flushSurfaceToScreenCG ( )
private

◆ flushSurfaceToWindowContext()

virtual void AquaSkiaSalGraphicsImpl::flushSurfaceToWindowContext ( )
overrideprivatevirtual

Reimplemented from SkiaSalGraphicsImpl.

◆ freeResources()

virtual void AquaSkiaSalGraphicsImpl::freeResources ( )
overridevirtual

Implements SalGraphicsImpl.

◆ getWindowScaling()

virtual int AquaSkiaSalGraphicsImpl::getWindowScaling ( ) const
overrideprivatevirtual

Reimplemented from SkiaSalGraphicsImpl.

◆ prepareSkia()

static void AquaSkiaSalGraphicsImpl::prepareSkia ( )
static

◆ UpdateGeometryProvider()

virtual void AquaSkiaSalGraphicsImpl::UpdateGeometryProvider ( SalGeometryProvider provider)
inlineoverridevirtual

Reimplemented from AquaGraphicsBackendBase.

Definition at line 31 of file osx/gdiimpl.hxx.

References SkiaSalGraphicsImpl::setProvider().

◆ WindowBackingPropertiesChanged()

virtual void AquaSkiaSalGraphicsImpl::WindowBackingPropertiesChanged ( )
overridevirtual

Reimplemented from AquaGraphicsBackendBase.

Member Data Documentation

◆ fontManager

sk_sp<SkFontMgr> AquaSkiaSalGraphicsImpl::fontManager
inlinestaticprivate

Definition at line 52 of file osx/gdiimpl.hxx.


The documentation for this class was generated from the following file: