diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-11-15 22:18:46 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-11-16 10:40:19 +0100 |
commit | adba50494e11ca799ce6a794195ff844dfac7cd3 (patch) | |
tree | 5e3f81e6231c6ef0744b3fca91b3049e546af8d6 /vcl | |
parent | 07e5e9f4c4318c19dd553459132efa71d456eaef (diff) |
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.lunak@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/skia/salbmp.hxx | 24 |
1 files changed, 19 insertions, 5 deletions
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; } |