LibreOffice Module vcl (master) 1
gdiimpl.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#ifndef INCLUDED_VCL_SKIA_GDIIMPL_HXX
21#define INCLUDED_VCL_SKIA_GDIIMPL_HXX
22
23#include <vcl/dllapi.h>
24
25#include <salgdiimpl.hxx>
26#include <salgeom.hxx>
27
28#include <skia/utils.hxx>
29
30#include <SkPaint.h>
31
32class SkiaFlushIdle;
34class SkFont;
35class SkiaSalBitmap;
36
38{
39public:
41 virtual ~SkiaSalGraphicsImpl() override;
42
43 virtual void Init() override;
44
45 virtual void DeInit() override;
46
47 virtual OUString getRenderBackendName() const override { return "skia"; }
48
49 const vcl::Region& getClipRegion() const;
50 virtual bool setClipRegion(const vcl::Region&) override;
51
52 //
53 // get the depth of the device
54 virtual sal_uInt16 GetBitCount() const override;
55
56 // get the width of the device
57 virtual tools::Long GetGraphicsWidth() const override;
58
59 // set the clip region to empty
60 virtual void ResetClipRegion() override;
61
62 // set the line color to transparent (= don't draw lines)
63
64 virtual void SetLineColor() override;
65
66 // set the line color to a specific color
67 virtual void SetLineColor(Color nColor) override;
68
69 // set the fill color to transparent (= don't fill)
70 virtual void SetFillColor() override;
71
72 // set the fill color to a specific color, shapes will be
73 // filled accordingly
74 virtual void SetFillColor(Color nColor) override;
75
76 // enable/disable XOR drawing
77 virtual void SetXORMode(bool bSet, bool bInvertOnly) override;
78
79 // set line color for raster operations
80 virtual void SetROPLineColor(SalROPColor nROPColor) override;
81
82 // set fill color for raster operations
83 virtual void SetROPFillColor(SalROPColor nROPColor) override;
84
85 // draw --> LineColor and FillColor and RasterOp and ClipRegion
86 virtual void drawPixel(tools::Long nX, tools::Long nY) override;
87 virtual void drawPixel(tools::Long nX, tools::Long nY, Color nColor) override;
88
89 virtual void drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2,
90 tools::Long nY2) override;
91
92 virtual void drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth,
93 tools::Long nHeight) override;
94
95 virtual void drawPolyLine(sal_uInt32 nPoints, const Point* pPtAry) override;
96
97 virtual void drawPolygon(sal_uInt32 nPoints, const Point* pPtAry) override;
98
99 virtual void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32* pPoints,
100 const Point** pPtAry) override;
101
102 virtual bool drawPolyPolygon(const basegfx::B2DHomMatrix& rObjectToDevice,
103 const basegfx::B2DPolyPolygon&, double fTransparency) override;
104
105 virtual bool drawPolyLine(const basegfx::B2DHomMatrix& rObjectToDevice,
106 const basegfx::B2DPolygon&, double fTransparency, double fLineWidth,
107 const std::vector<double>* pStroke, basegfx::B2DLineJoin,
108 css::drawing::LineCap, double fMiterMinimumAngle,
109 bool bPixelSnapHairline) override;
110
111 virtual bool drawPolyLineBezier(sal_uInt32 nPoints, const Point* pPtAry,
112 const PolyFlags* pFlgAry) override;
113
114 virtual bool drawPolygonBezier(sal_uInt32 nPoints, const Point* pPtAry,
115 const PolyFlags* pFlgAry) override;
116
117 virtual bool drawPolyPolygonBezier(sal_uInt32 nPoly, const sal_uInt32* pPoints,
118 const Point* const* pPtAry,
119 const PolyFlags* const* pFlgAry) override;
120
121 // CopyArea --> No RasterOp, but ClipRegion
122 virtual void copyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX,
123 tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight,
124 bool bWindowInvalidate) override;
125
126 virtual void copyBits(const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics) override;
127
128 virtual bool blendBitmap(const SalTwoRect&, const SalBitmap& rBitmap) override;
129
130 virtual bool blendAlphaBitmap(const SalTwoRect&, const SalBitmap& rSrcBitmap,
131 const SalBitmap& rMaskBitmap,
132 const SalBitmap& rAlphaBitmap) override;
133
134 virtual void drawBitmap(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap) override;
135
136 virtual void drawBitmap(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap,
137 const SalBitmap& rMaskBitmap) override;
138
139 virtual void drawMask(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap,
140 Color nMaskColor) override;
141
142 virtual std::shared_ptr<SalBitmap> getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth,
143 tools::Long nHeight) override;
144
145 virtual Color getPixel(tools::Long nX, tools::Long nY) override;
146
147 // invert --> ClipRegion (only Windows or VirDevs)
148 virtual void invert(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight,
149 SalInvert nFlags) override;
150
151 virtual void invert(sal_uInt32 nPoints, const Point* pPtAry, SalInvert nFlags) override;
152
153 virtual bool drawEPS(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight,
154 void* pPtr, sal_uInt32 nSize) override;
155
168 virtual bool drawAlphaBitmap(const SalTwoRect&, const SalBitmap& rSourceBitmap,
169 const SalBitmap& rAlphaBitmap) override;
170
172 virtual bool drawTransformedBitmap(const basegfx::B2DPoint& rNull, const basegfx::B2DPoint& rX,
173 const basegfx::B2DPoint& rY, const SalBitmap& rSourceBitmap,
174 const SalBitmap* pAlphaBitmap, double fAlpha) override;
175
176 virtual bool hasFastDrawTransformedBitmap() const override;
177
194 tools::Long nHeight, sal_uInt8 nTransparency) override;
195
196 virtual bool drawGradient(const tools::PolyPolygon& rPolygon,
197 const Gradient& rGradient) override;
198 virtual bool implDrawGradient(const basegfx::B2DPolyPolygon& rPolyPolygon,
199 const SalGradient& rGradient) override;
200
201 virtual bool supportsOperation(OutDevSupportType eType) const override;
202
203 // Dump contents to a file for debugging.
204 void dump(const char* file) const;
205
206 // Default blend mode for SkPaint is SkBlendMode::kSrcOver
207 void drawBitmap(const SalTwoRect& rPosAry, const SkiaSalBitmap& bitmap,
208 SkBlendMode blendMode = SkBlendMode::kSrcOver);
209
210 void drawImage(const SalTwoRect& rPosAry, const sk_sp<SkImage>& aImage, int srcScaling = 1,
211 SkBlendMode eBlendMode = SkBlendMode::kSrcOver);
212
213 void drawShader(const SalTwoRect& rPosAry, const sk_sp<SkShader>& shader,
214 SkBlendMode blendMode = SkBlendMode::kSrcOver);
215
216 void drawGenericLayout(const GenericSalLayout& layout, Color textColor, const SkFont& font,
217 const SkFont& verticalFont);
218
219protected:
220 // To be called before any drawing.
221 void preDraw();
222 // To be called after any drawing.
223 void postDraw();
224 // The canvas to draw to.
225 SkCanvas* getDrawCanvas() { return mSurface->getCanvas(); }
226 // Call before makeImageSnapshot(), ensures the content is up to date.
228
229 virtual void createSurface();
230 // Call to ensure that mSurface is valid. If mSurface is going to be modified,
231 // use preDraw() instead of this.
234 // Reimplemented for X11.
235 virtual bool avoidRecreateByResize() const;
236 void createWindowSurface(bool forceRaster = false);
237 virtual void createWindowSurfaceInternal(bool forceRaster = false) = 0;
240
242 tools::Long nHeight, double nTransparency, bool blockAA = false);
244
245 void setProvider(SalGeometryProvider* provider) { mProvider = provider; }
246
247 bool isOffscreen() const;
248 bool isGPU() const { return mIsGPU; }
249
250 void invert(basegfx::B2DPolygon const& rPoly, SalInvert eFlags);
251
252 // Called by SkiaFlushIdle.
255 friend class SkiaFlushIdle;
256
257 // get the width of the device
258 int GetWidth() const { return mProvider ? mProvider->GetWidth() : 1; }
259 // get the height of the device
260 int GetHeight() const { return mProvider ? mProvider->GetHeight() : 1; }
261 // Get the global HiDPI scaling factor.
262 virtual int getWindowScaling() const;
263
264 void addUpdateRegion(const SkRect& rect)
265 {
266 // Make slightly larger, just in case (rounding, antialiasing,...).
267 SkIRect addedRect = rect.makeOutset(2, 2).round();
268 // Using SkIRect should be enough, SkRegion would be too slow with many operations
269 // and swapping to the screen is not _that_slow.
270 mDirtyRect.join(addedRect);
271 }
274 static void setCanvasClipRegion(SkCanvas* canvas, const vcl::Region& region);
275 sk_sp<SkImage> mergeCacheBitmaps(const SkiaSalBitmap& bitmap, const SkiaSalBitmap* alphaBitmap,
276 const Size& targetSize);
278 static OString makeCachedImageKey(const SkiaSalBitmap& bitmap, const SkiaSalBitmap* alphaBitmap,
279 const Size& targetSize, DirectImage bitmapType,
280 DirectImage alphaBitmapType);
281
282 // Skia uses floating point coordinates, so when we use integer coordinates, sometimes
283 // rounding results in off-by-one errors (down), especially when drawing using GPU,
284 // see https://bugs.chromium.org/p/skia/issues/detail?id=9611 . Compensate for
285 // it by using centers of pixels. Using 0.5 may sometimes round up, so go with 0.495 .
286 static constexpr SkScalar toSkX(tools::Long x) { return x + 0.495; }
287 static constexpr SkScalar toSkY(tools::Long y) { return y + 0.495; }
288 // Value to add to be exactly in the middle of the pixel.
289 static constexpr SkScalar toSkXYFix = SkScalar(0.005);
290
291 // Perform any pending drawing such as delayed merging of polygons. Called by preDraw()
292 // and anything that means the next operation cannot be another one in a series (e.g.
293 // changing colors).
295 bool delayDrawPolyPolygon(const basegfx::B2DPolyPolygon& polygon, double transparency);
296 void performDrawPolyPolygon(const basegfx::B2DPolyPolygon& polygon, double transparency,
297 bool useAA);
298
300 SkSamplingOptions makeSamplingOptions(const SalTwoRect& rPosAry, int scalingFactor,
301 int srcScalingFactor = 1)
302 {
303 return SkiaHelper::makeSamplingOptions(rPosAry, scalingFactor, srcScalingFactor, isGPU());
304 }
305 SkSamplingOptions makeSamplingOptions(const SkMatrix& matrix, int scalingFactor)
306 {
307 return SkiaHelper::makeSamplingOptions(goodScalingQuality(), matrix, scalingFactor);
308 }
309
310 // Create SkPaint to use when drawing to the surface. It is not to be used
311 // when doing internal drawing such as when merging two bitmaps together.
312 // This may apply some default settings to the paint as necessary.
313 SkPaint makePaintInternal() const;
314 // Create SkPaint set up for drawing lines (using mLineColor etc.).
315 SkPaint makeLinePaint(double transparency = 0) const;
316 // Create SkPaint set up for filling (using mFillColor etc.).
317 SkPaint makeFillPaint(double transparency = 0) const;
318 // Create SkPaint set up for bitmap drawing.
319 SkPaint makeBitmapPaint() const;
320 // Create SkPaint set up for gradient drawing.
321 SkPaint makeGradientPaint() const;
322 // Create SkPaint set up for text drawing.
323 SkPaint makeTextPaint(Color color) const;
324 // Create SkPaint for unspecified pixel drawing. Avoid if possible.
325 SkPaint makePixelPaint(Color color) const;
326
327 template <typename charT, typename traits>
328 friend inline std::basic_ostream<charT, traits>&
329 operator<<(std::basic_ostream<charT, traits>& stream, const SkiaSalGraphicsImpl* graphics)
330 {
331 if (graphics == nullptr)
332 return stream << "(null)";
333 // O - offscreen, G - GPU-based, R - raster
334 stream << static_cast<const void*>(graphics) << " "
335 << Size(graphics->GetWidth(), graphics->GetHeight());
336 if (graphics->mScaling != 1)
337 stream << "*" << graphics->mScaling;
338 stream << (graphics->isGPU() ? "G" : "R") << (graphics->isOffscreen() ? "O" : "");
339 return stream;
340 }
341
345 // The Skia surface that is target of all the rendering.
346 sk_sp<SkSurface> mSurface;
347 // Note that mSurface may be a proxy surface and not the one from the window context.
348 std::unique_ptr<sk_app::WindowContext> mWindowContext;
349 bool mIsGPU; // whether the surface is GPU-backed
350 // Note that we generally use VCL coordinates, which is not mSurface coordinates if mScaling!=1.
351 SkIRect mDirtyRect; // The area that has been changed since the last performFlush().
355 enum class XorMode
356 {
357 None,
358 Invert,
359 Xor
360 };
362 std::unique_ptr<SkiaFlushIdle> mFlush;
363 // Info about pending polygons to draw (we try to merge adjacent polygons into one).
365 {
369 };
371 inline static int pendingOperationsToFlush = 0;
372 int mScaling; // The scale factor for HiDPI screens.
373};
374
376{
377 SkPaint paint;
378 // Invert could be done using a blend mode like invert() does, but
379 // intentionally use SkBlender to make sure it's not overwritten
380 // by a blend mode set later (which would be probably a mistake),
381 // and so that the drawing color does not actually matter.
384 else if (mXorMode == XorMode::Xor)
386 return paint;
387}
388
389inline SkPaint SkiaSalGraphicsImpl::makeLinePaint(double transparency) const
390{
391 assert(mLineColor != SALCOLOR_NONE);
392 SkPaint paint = makePaintInternal();
393 paint.setColor(transparency == 0
396 paint.setStyle(SkPaint::kStroke_Style);
397 return paint;
398}
399
400inline SkPaint SkiaSalGraphicsImpl::makeFillPaint(double transparency) const
401{
402 assert(mFillColor != SALCOLOR_NONE);
403 SkPaint paint = makePaintInternal();
404 paint.setColor(transparency == 0
407 if (mLineColor == mFillColor)
408 paint.setStyle(SkPaint::kStrokeAndFill_Style);
409 else
410 paint.setStyle(SkPaint::kFill_Style);
411 return paint;
412}
413
414inline SkPaint SkiaSalGraphicsImpl::makeBitmapPaint() const { return makePaintInternal(); }
415
417
419{
420 assert(color != SALCOLOR_NONE);
421 SkPaint paint = makePaintInternal();
422 paint.setColor(SkiaHelper::toSkColor(color));
423 return paint;
424}
425
427{
428 assert(color != SALCOLOR_NONE);
429 SkPaint paint = makePaintInternal();
430 paint.setColor(SkiaHelper::toSkColor(color));
431 return paint;
432}
433
434#endif
435
436/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Interface used to share logic on sizing between SalVirtualDevices and SalFrames.
Definition: salgeom.hxx:80
Implementation class for SalGraphics.
Definition: salgdiimpl.hxx:51
sk_sp< SkSurface > mSurface
Definition: gdiimpl.hxx:346
virtual std::shared_ptr< SalBitmap > getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override
virtual void SetROPFillColor(SalROPColor nROPColor) override
void drawGenericLayout(const GenericSalLayout &layout, Color textColor, const SkFont &font, const SkFont &verticalFont)
virtual tools::Long GetGraphicsWidth() const override
void setProvider(SalGeometryProvider *provider)
Definition: gdiimpl.hxx:245
virtual void ResetClipRegion() override
SkPaint makeGradientPaint() const
Definition: gdiimpl.hxx:416
virtual int getWindowScaling() const
void privateDrawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, double nTransparency, bool blockAA=false)
void invert(basegfx::B2DPolygon const &rPoly, SalInvert eFlags)
virtual void SetROPLineColor(SalROPColor nROPColor) override
static constexpr SkScalar toSkY(tools::Long y)
Definition: gdiimpl.hxx:287
virtual void drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override
virtual void SetFillColor(Color nColor) override
void createWindowSurface(bool forceRaster=false)
SalGraphics & mParent
Definition: gdiimpl.hxx:342
virtual void SetXORMode(bool bSet, bool bInvertOnly) override
std::unique_ptr< SkiaFlushIdle > mFlush
Definition: gdiimpl.hxx:362
SkCanvas * getDrawCanvas()
Definition: gdiimpl.hxx:225
virtual bool drawAlphaBitmap(const SalTwoRect &, const SalBitmap &rSourceBitmap, const SalBitmap &rAlphaBitmap) override
Render bitmap with alpha channel.
virtual bool avoidRecreateByResize() const
virtual bool drawPolygonBezier(sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry) override
virtual bool implDrawGradient(const basegfx::B2DPolyPolygon &rPolyPolygon, const SalGradient &rGradient) override
SkSamplingOptions makeSamplingOptions(const SalTwoRect &rPosAry, int scalingFactor, int srcScalingFactor=1)
Definition: gdiimpl.hxx:300
bool isGPU() const
Definition: gdiimpl.hxx:248
virtual void drawMask(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, Color nMaskColor) override
SkPaint makeLinePaint(double transparency=0) const
Definition: gdiimpl.hxx:389
virtual bool supportsOperation(OutDevSupportType eType) const override
virtual void DeInit() override
virtual void SetLineColor(Color nColor) 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
void dump(const char *file) const
SalGeometryProvider * mProvider
Pointer to the SalFrame or SalVirtualDevice.
Definition: gdiimpl.hxx:344
vcl::Region mClipRegion
Definition: gdiimpl.hxx:352
virtual void drawBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, const SalBitmap &rMaskBitmap) override
virtual void drawPixel(tools::Long nX, tools::Long nY, Color nColor) override
virtual void createWindowSurfaceInternal(bool forceRaster=false)=0
BmpScaleFlag goodScalingQuality() const
Definition: gdiimpl.hxx:299
virtual void Init() override
SkPaint makeTextPaint(Color color) const
Definition: gdiimpl.hxx:418
virtual void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point **pPtAry) override
virtual Color getPixel(tools::Long nX, tools::Long nY) override
void drawImage(const SalTwoRect &rPosAry, const sk_sp< SkImage > &aImage, int srcScaling=1, SkBlendMode eBlendMode=SkBlendMode::kSrcOver)
virtual bool setClipRegion(const vcl::Region &) override
void setCanvasScalingAndClipping()
virtual ~SkiaSalGraphicsImpl() override
SkSamplingOptions makeSamplingOptions(const SkMatrix &matrix, int scalingFactor)
Definition: gdiimpl.hxx:305
virtual bool drawEPS(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void *pPtr, sal_uInt32 nSize) override
virtual bool blendBitmap(const SalTwoRect &, const SalBitmap &rBitmap) override
virtual bool drawGradient(const tools::PolyPolygon &rPolygon, const Gradient &rGradient) override
bool isOffscreen() const
SkiaSalGraphicsImpl(SalGraphics &pParent, SalGeometryProvider *pProvider)
int GetHeight() const
Definition: gdiimpl.hxx:260
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
static void setCanvasClipRegion(SkCanvas *canvas, const vcl::Region &region)
virtual void SetFillColor() override
static constexpr SkScalar toSkX(tools::Long x)
Definition: gdiimpl.hxx:286
bool delayDrawPolyPolygon(const basegfx::B2DPolyPolygon &polygon, double transparency)
void addUpdateRegion(const SkRect &rect)
Definition: gdiimpl.hxx:264
virtual void drawPixel(tools::Long nX, tools::Long nY) override
virtual void drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2) override
int GetWidth() const
Definition: gdiimpl.hxx:258
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.
virtual OUString getRenderBackendName() const override
Definition: gdiimpl.hxx:47
virtual bool drawPolyLineBezier(sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry) override
void resetCanvasScalingAndClipping()
virtual void drawBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap) override
void privateCopyBits(const SalTwoRect &rPosAry, SkiaSalGraphicsImpl *src)
virtual sal_uInt16 GetBitCount() const override
SkPaint makePaintInternal() const
Definition: gdiimpl.hxx:375
void createOffscreenSurface()
virtual void SetLineColor() override
sk_sp< SkImage > mergeCacheBitmaps(const SkiaSalBitmap &bitmap, const SkiaSalBitmap *alphaBitmap, const Size &targetSize)
virtual bool drawPolyPolygon(const basegfx::B2DHomMatrix &rObjectToDevice, const basegfx::B2DPolyPolygon &, double fTransparency) override
virtual void invert(sal_uInt32 nPoints, const Point *pPtAry, SalInvert nFlags) override
SkPaint makeBitmapPaint() const
Definition: gdiimpl.hxx:414
virtual bool hasFastDrawTransformedBitmap() const override
void drawBitmap(const SalTwoRect &rPosAry, const SkiaSalBitmap &bitmap, SkBlendMode blendMode=SkBlendMode::kSrcOver)
virtual bool blendAlphaBitmap(const SalTwoRect &, const SalBitmap &rSrcBitmap, const SalBitmap &rMaskBitmap, const SalBitmap &rAlphaBitmap) override
virtual void drawPolyLine(sal_uInt32 nPoints, const Point *pPtAry) override
SkPaint makeFillPaint(double transparency=0) const
Definition: gdiimpl.hxx:400
SkPaint makePixelPaint(Color color) const
Definition: gdiimpl.hxx:426
virtual bool drawPolyPolygonBezier(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point *const *pPtAry, const PolyFlags *const *pFlgAry) override
virtual void drawPolygon(sal_uInt32 nPoints, const Point *pPtAry) override
void drawShader(const SalTwoRect &rPosAry, const sk_sp< SkShader > &shader, SkBlendMode blendMode=SkBlendMode::kSrcOver)
virtual void invert(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags) override
std::unique_ptr< sk_app::WindowContext > mWindowContext
Definition: gdiimpl.hxx:348
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 createSurface()
void performDrawPolyPolygon(const basegfx::B2DPolyPolygon &polygon, double transparency, bool useAA)
virtual void copyBits(const SalTwoRect &rPosAry, SalGraphics *pSrcGraphics) override
const vcl::Region & getClipRegion() const
LastPolyPolygonInfo mLastPolyPolygonInfo
Definition: gdiimpl.hxx:370
virtual void flushSurfaceToWindowContext()
static OString makeCachedImageKey(const SkiaSalBitmap &bitmap, const SkiaSalBitmap *alphaBitmap, const Size &targetSize, DirectImage bitmapType, DirectImage alphaBitmapType)
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
Reference< XOutputStream > stream
float y
float x
VCL_DLLPUBLIC std::ostream & operator<<(std::ostream &os, const ErrCode &err)
Definition: errcode.cxx:22
void setBlenderXor(SkPaint *paint)
BmpScaleFlag goodScalingQuality(bool isGPU)
Definition: utils.hxx:153
SkColor toSkColorWithTransparency(Color aColor, double fTransparency)
Definition: utils.hxx:83
SkSamplingOptions makeSamplingOptions(BmpScaleFlag scalingType, SkMatrix matrix, int scalingFactor)
Definition: utils.hxx:166
void setBlenderInvert(SkPaint *paint)
SkColor toSkColor(Color color)
Definition: utils.hxx:78
::std::vector< B2DPolyPolygon > B2DPolyPolygonVector
None
long Long
PolyFlags
SalROPColor
Definition: salgtype.hxx:70
SalInvert
Definition: salgtype.hxx:74
constexpr ::Color SALCOLOR_NONE(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
basegfx::B2DPolyPolygonVector polygons
Definition: gdiimpl.hxx:366
unsigned char sal_uInt8
OutDevSupportType
Definition: vclenum.hxx:174