vcl/inc/skia/gdiimpl.hxx |   16 ++++++++--------
 vcl/skia/gdiimpl.cxx     |    2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 06ec063412cd6de022dd70743ef06558446d57ab
Author:     Noel Grandin <[email protected]>
AuthorDate: Thu Jan 8 10:20:23 2026 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Sat Jan 10 12:15:08 2026 +0100

    tdf#169914 dark mode + editing report + Windows + chart is broken
    
    regression from
      commit 9791aaaa31749857e719ab8b6926b180966f959b
      Author: Noel Grandin <[email protected]>
      Date:   Tue Aug 5 14:40:41 2025 +0200
      tdf#167643 Selection is black
    
    What is weird here is that this is what I first tried when fixing
    tdf#167643, and it did not work.
    
    But now this change does work, and tdf#167643 does not recur.
    Huh.
    
    It still looks terrible, but at least it is visible now.
    
    The report designer will likely need further work to support
    dark mode properly, and likely chart rendering too.
    
    Change-Id: I6b7ed5d073a73377edcb772ef016cdb53294eb9e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196827
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/vcl/inc/skia/gdiimpl.hxx b/vcl/inc/skia/gdiimpl.hxx
index 774275f0a2da..1da86264f588 100644
--- a/vcl/inc/skia/gdiimpl.hxx
+++ b/vcl/inc/skia/gdiimpl.hxx
@@ -293,11 +293,11 @@ protected:
     // Create SkPaint to use when drawing to the surface. It is not to be used
     // when doing internal drawing such as when merging two bitmaps together.
     // This may apply some default settings to the paint as necessary.
-    SkPaint makePaintInternal(bool bSrcATop = false) const;
+    SkPaint makePaintInternal(bool bSrcOver = false) const;
     // Create SkPaint set up for drawing lines (using mLineColor etc.).
     SkPaint makeLinePaint(double transparency = 0) const;
     // Create SkPaint set up for filling (using mFillColor etc.).
-    SkPaint makeFillPaint(double transparency = 0, bool bSrcATop = false) 
const;
+    SkPaint makeFillPaint(double transparency = 0, bool bSrcOver = false) 
const;
     // Create SkPaint set up for bitmap drawing.
     SkPaint makeBitmapPaint() const;
     // Create SkPaint set up for gradient drawing.
@@ -358,7 +358,7 @@ protected:
     bool mInWindowBackingPropertiesChanged;
 };
 
-inline SkPaint SkiaSalGraphicsImpl::makePaintInternal(bool bSrcATop) const
+inline SkPaint SkiaSalGraphicsImpl::makePaintInternal(bool bSrcOver) const
 {
     SkPaint paint;
     // Invert could be done using a blend mode like invert() does, but
@@ -369,8 +369,8 @@ inline SkPaint SkiaSalGraphicsImpl::makePaintInternal(bool 
bSrcATop) const
         SkiaHelper::setBlenderInvert(&paint);
     else if (mXorMode == XorMode::Xor)
         SkiaHelper::setBlenderXor(&paint);
-    else if (bSrcATop)
-        paint.setBlendMode(SkBlendMode::kSrcATop);
+    else if (bSrcOver)
+        paint.setBlendMode(SkBlendMode::kSrcOver);
     else
         paint.setBlendMode(SkBlendMode::kSrc); // set as is, including alpha
     return paint;
@@ -387,10 +387,10 @@ inline SkPaint SkiaSalGraphicsImpl::makeLinePaint(double 
transparency) const
     return paint;
 }
 
-inline SkPaint SkiaSalGraphicsImpl::makeFillPaint(double transparency, bool 
bSrcATop) const
+inline SkPaint SkiaSalGraphicsImpl::makeFillPaint(double transparency, bool 
bSrcOver) const
 {
     assert(moFillColor.has_value());
-    SkPaint paint = makePaintInternal(bSrcATop);
+    SkPaint paint = makePaintInternal(bSrcOver);
     paint.setColor(transparency == 0
                        ? SkiaHelper::toSkColor(*moFillColor)
                        : SkiaHelper::toSkColorWithTransparency(*moFillColor, 
transparency));
@@ -420,7 +420,7 @@ inline SkPaint SkiaSalGraphicsImpl::makeGradientPaint() 
const { return makePaint
 inline SkPaint SkiaSalGraphicsImpl::makeTextPaint(std::optional<Color> color) 
const
 {
     assert(color.has_value());
-    SkPaint paint = makePaintInternal(/*bSrcATop*/ true);
+    SkPaint paint = makePaintInternal(/*bSrcOver*/ true);
     paint.setColor(SkiaHelper::toSkColor(*color));
     return paint;
 }
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 40091ec62069..d68f02337a0b 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -965,7 +965,7 @@ void SkiaSalGraphicsImpl::performDrawPolyPolygon(const 
basegfx::B2DPolyPolygon&
     }
     if (moFillColor)
     {
-        SkPaint aPaint = makeFillPaint(fTransparency, /*bSrcATop*/ true);
+        SkPaint aPaint = makeFillPaint(fTransparency, /*bSrcOver*/ true);
         aPaint.setAntiAlias(useAA);
         // HACK: If the polygon is just a line, it still should be drawn. But 
when filling
         // Skia doesn't draw empty polygons, so in that case ensure the line 
is drawn.

Reply via email to