vcl/inc/skia/salbmp.hxx |   24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

New commits:
commit adba50494e11ca799ce6a794195ff844dfac7cd3
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Mon Nov 15 22:18:46 2021 +0100
Commit:     Luboš Luňák <l.lu...@collabora.com>
CommitDate: Tue Nov 16 10:40:19 2021 +0100

    log also whether SkiaSalBitmap has any pending scaling
    
    Change-Id: I09a1921e203e1088577abf75350c8b41e4c78381
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125265
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lu...@collabora.com>

diff --git a/vcl/inc/skia/salbmp.hxx b/vcl/inc/skia/salbmp.hxx
index 455414fdd7fa..b2f452c82979 100644
--- a/vcl/inc/skia/salbmp.hxx
+++ b/vcl/inc/skia/salbmp.hxx
@@ -21,12 +21,13 @@
 #define INCLUDED_VCL_INC_SKIA_SALBMP_H
 
 #include <salbmp.hxx>
-
-#include <SkImage.h>
+#include <vcl/bitmap.hxx>
 
 #include <boost/shared_ptr.hpp>
 
-#include <vcl/bitmap.hxx>
+#include <skia/utils.hxx>
+
+#include <SkImage.h>
 
 class VCL_PLUGIN_PUBLIC SkiaSalBitmap final : public SalBitmap
 {
@@ -139,8 +140,8 @@ private:
 #endif
 
     template <typename charT, typename traits>
-    friend inline std::basic_ostream<charT, traits>&
-    operator<<(std::basic_ostream<charT, traits>& stream, const SkiaSalBitmap* 
bitmap)
+    friend std::basic_ostream<charT, traits>& 
operator<<(std::basic_ostream<charT, traits>& stream,
+                                                         const SkiaSalBitmap* 
bitmap)
     {
         if (bitmap == nullptr)
             return stream << "(null)";
@@ -149,19 +150,32 @@ private:
         // A/a - has alpha SkImage (on GPU/CPU)
         // E - has erase color
         // B - has pixel buffer
+        // (wxh) - has pending scaling (after each item)
         stream << static_cast<const void*>(bitmap) << " " << bitmap->GetSize() 
<< "x"
                << bitmap->GetBitCount();
         if (bitmap->GetBitCount() <= 8 && 
!bitmap->Palette().IsGreyPalette8Bit())
             stream << "p";
         stream << "/";
         if (bitmap->mImage)
+        {
             stream << (bitmap->mImage->isTextureBacked() ? "I" : "i");
+            if (SkiaHelper::imageSize(bitmap->mImage) != bitmap->mSize)
+                stream << "(" << SkiaHelper::imageSize(bitmap->mImage) << ")";
+        }
         if (bitmap->mAlphaImage)
+        {
             stream << (bitmap->mAlphaImage->isTextureBacked() ? "A" : "a");
+            if (SkiaHelper::imageSize(bitmap->mAlphaImage) != bitmap->mSize)
+                stream << "(" << SkiaHelper::imageSize(bitmap->mAlphaImage) << 
")";
+        }
         if (bitmap->mEraseColorSet)
             stream << "E" << bitmap->mEraseColor;
         if (bitmap->mBuffer)
+        {
             stream << "B";
+            if (bitmap->mSize != bitmap->mPixelsSize)
+                stream << "(" << bitmap->mPixelsSize << ")";
+        }
         return stream;
     }
 

Reply via email to