summaryrefslogtreecommitdiffstats
path: root/src/core/type_conversion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/type_conversion.cpp')
-rw-r--r--src/core/type_conversion.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/core/type_conversion.cpp b/src/core/type_conversion.cpp
index f69b2a297..02d2db448 100644
--- a/src/core/type_conversion.cpp
+++ b/src/core/type_conversion.cpp
@@ -42,7 +42,9 @@
#include <content/public/common/favicon_url.h>
#include <ui/events/event_constants.h>
#include <ui/gfx/image/image_skia.h>
+
#include <QtCore/qcoreapplication.h>
+#include <QtGui/qmatrix4x4.h>
namespace QtWebEngineCore {
@@ -131,7 +133,7 @@ QImage toQImage(const SkBitmap &bitmap)
QImage toQImage(const gfx::ImageSkiaRep &imageSkiaRep)
{
- QImage image = toQImage(imageSkiaRep.sk_bitmap());
+ QImage image = toQImage(imageSkiaRep.GetBitmap());
if (!image.isNull() && imageSkiaRep.scale() != 1.0f)
image.setDevicePixelRatio(imageSkiaRep.scale());
return image;
@@ -243,4 +245,15 @@ FaviconInfo toFaviconInfo(const content::FaviconURL &favicon_url)
return info;
}
+void convertToQt(const SkMatrix44 &m, QMatrix4x4 &c)
+{
+ QMatrix4x4 qtMatrix(
+ m.get(0, 0), m.get(0, 1), m.get(0, 2), m.get(0, 3),
+ m.get(1, 0), m.get(1, 1), m.get(1, 2), m.get(1, 3),
+ m.get(2, 0), m.get(2, 1), m.get(2, 2), m.get(2, 3),
+ m.get(3, 0), m.get(3, 1), m.get(3, 2), m.get(3, 3));
+ qtMatrix.optimize();
+ c = qtMatrix;
+}
+
} // namespace QtWebEngineCore