LibreOffice Module vcl (master) 1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Static Protected Attributes | Private Attributes | List of all members
WinSkiaSalGraphicsImpl Class Reference

#include <gdiimpl.hxx>

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

Public Member Functions

 WinSkiaSalGraphicsImpl (WinSalGraphics &rGraphics, SalGeometryProvider *mpProvider)
 
virtual bool UseRenderNativeControl () const override
 
virtual bool TryRenderCachedNativeControl (ControlCacheKey const &rControlCacheKey, int nX, int nY) override
 
virtual bool RenderAndCacheNativeControl (CompatibleDC &rWhite, CompatibleDC &rBlack, int nX, int nY, ControlCacheKey &aControlCacheKey) override
 
virtual bool DrawTextLayout (const GenericSalLayout &layout) override
 
virtual void ClearDevFontCache () override
 
virtual void ClearNativeControlCache () override
 
virtual void freeResources () override
 
virtual void Flush () 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 bool 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 bool 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 WinSalGraphicsImplBase
virtual ~WinSalGraphicsImplBase ()
 
virtual bool UseRenderNativeControl () const
 
virtual bool TryRenderCachedNativeControl (const ControlCacheKey &, int, int)
 
virtual bool RenderAndCacheNativeControl (CompatibleDC &, CompatibleDC &, int, int, ControlCacheKey &)
 
virtual void ClearDevFontCache ()
 
virtual void Flush ()
 
virtual bool DrawTextLayout (const GenericSalLayout &)
 
virtual void ClearNativeControlCache ()
 

Static Public Member Functions

static void prepareSkia ()
 

Protected Member Functions

virtual void createWindowSurfaceInternal (bool forceRaster=false) override
 
- 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 (Color color) const
 
SkPaint makePixelPaint (Color color) const
 

Static Protected Member Functions

static sk_sp< SkTypeface > createDirectWriteTypeface (HDC hdc, HFONT hfont)
 
static void initFontInfo ()
 
- 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 Attributes

static sal::systools::COMReference< IDWriteFactory > dwriteFactory
 
static sal::systools::COMReference< IDWriteGdiInterop > dwriteGdiInterop
 
static sal::systools::COMReference< IDWriteFontSetBuilder > dwriteFontSetBuilder
 
static sal::systools::COMReference< IDWriteFontCollection1 > dwritePrivateCollection
 
static sk_sp< SkFontMgr > dwriteFontMgr
 
static bool dwriteDone = false
 
static SkFont::Edging fontEdging
 
- Static Protected Attributes inherited from SkiaSalGraphicsImpl
static constexpr SkScalar toSkXYFix = SkScalar(0.005)
 
static int pendingOperationsToFlush = 0
 

Private Attributes

WinSalGraphicsmWinParent
 

Additional Inherited Members

- Protected Types inherited from SkiaSalGraphicsImpl
enum class  XorMode {
  None ,
  Invert ,
  Xor
}
 
using DirectImage = SkiaHelper::DirectImage
 
- 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
 
Color mLineColor
 
Color mFillColor
 
XorMode mXorMode
 
std::unique_ptr< SkiaFlushIdlemFlush
 
LastPolyPolygonInfo mLastPolyPolygonInfo
 
int mScaling
 

Detailed Description

Definition at line 41 of file win/gdiimpl.hxx.

Constructor & Destructor Documentation

◆ WinSkiaSalGraphicsImpl()

WinSkiaSalGraphicsImpl::WinSkiaSalGraphicsImpl ( WinSalGraphics rGraphics,
SalGeometryProvider mpProvider 
)

Member Function Documentation

◆ ClearDevFontCache()

virtual void WinSkiaSalGraphicsImpl::ClearDevFontCache ( )
overridevirtual

Reimplemented from WinSalGraphicsImplBase.

◆ ClearNativeControlCache()

virtual void WinSkiaSalGraphicsImpl::ClearNativeControlCache ( )
overridevirtual

Reimplemented from WinSalGraphicsImplBase.

◆ createDirectWriteTypeface()

static sk_sp< SkTypeface > WinSkiaSalGraphicsImpl::createDirectWriteTypeface ( HDC  hdc,
HFONT  hfont 
)
staticprotected

◆ createWindowSurfaceInternal()

virtual void WinSkiaSalGraphicsImpl::createWindowSurfaceInternal ( bool  forceRaster = false)
overrideprotectedvirtual

Implements SkiaSalGraphicsImpl.

◆ DrawTextLayout()

virtual bool WinSkiaSalGraphicsImpl::DrawTextLayout ( const GenericSalLayout layout)
overridevirtual

Reimplemented from WinSalGraphicsImplBase.

◆ Flush()

virtual void WinSkiaSalGraphicsImpl::Flush ( )
overridevirtual

Reimplemented from WinSalGraphicsImplBase.

◆ freeResources()

virtual void WinSkiaSalGraphicsImpl::freeResources ( )
overridevirtual

Implements SalGraphicsImpl.

◆ initFontInfo()

static void WinSkiaSalGraphicsImpl::initFontInfo ( )
staticprotected

◆ prepareSkia()

static void WinSkiaSalGraphicsImpl::prepareSkia ( )
static

◆ RenderAndCacheNativeControl()

virtual bool WinSkiaSalGraphicsImpl::RenderAndCacheNativeControl ( CompatibleDC rWhite,
CompatibleDC rBlack,
int  nX,
int  nY,
ControlCacheKey aControlCacheKey 
)
overridevirtual

Reimplemented from WinSalGraphicsImplBase.

◆ TryRenderCachedNativeControl()

virtual bool WinSkiaSalGraphicsImpl::TryRenderCachedNativeControl ( ControlCacheKey const &  rControlCacheKey,
int  nX,
int  nY 
)
overridevirtual

Reimplemented from WinSalGraphicsImplBase.

◆ UseRenderNativeControl()

virtual bool WinSkiaSalGraphicsImpl::UseRenderNativeControl ( ) const
inlineoverridevirtual

Reimplemented from WinSalGraphicsImplBase.

Definition at line 49 of file win/gdiimpl.hxx.

Member Data Documentation

◆ dwriteDone

bool WinSkiaSalGraphicsImpl::dwriteDone = false
inlinestaticprotected

Definition at line 73 of file win/gdiimpl.hxx.

◆ dwriteFactory

sal::systools::COMReference<IDWriteFactory> WinSkiaSalGraphicsImpl::dwriteFactory
inlinestaticprotected

Definition at line 68 of file win/gdiimpl.hxx.

◆ dwriteFontMgr

sk_sp<SkFontMgr> WinSkiaSalGraphicsImpl::dwriteFontMgr
inlinestaticprotected

Definition at line 72 of file win/gdiimpl.hxx.

◆ dwriteFontSetBuilder

sal::systools::COMReference<IDWriteFontSetBuilder> WinSkiaSalGraphicsImpl::dwriteFontSetBuilder
inlinestaticprotected

Definition at line 70 of file win/gdiimpl.hxx.

◆ dwriteGdiInterop

sal::systools::COMReference<IDWriteGdiInterop> WinSkiaSalGraphicsImpl::dwriteGdiInterop
inlinestaticprotected

Definition at line 69 of file win/gdiimpl.hxx.

◆ dwritePrivateCollection

sal::systools::COMReference<IDWriteFontCollection1> WinSkiaSalGraphicsImpl::dwritePrivateCollection
inlinestaticprotected

Definition at line 71 of file win/gdiimpl.hxx.

◆ fontEdging

SkFont::Edging WinSkiaSalGraphicsImpl::fontEdging
staticprotected

Definition at line 74 of file win/gdiimpl.hxx.

◆ mWinParent

WinSalGraphics& WinSkiaSalGraphicsImpl::mWinParent
private

Definition at line 44 of file win/gdiimpl.hxx.


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