diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2013-09-13 15:29:53 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-14 15:50:35 +0200 |
commit | 0b9ea2d05d1081ce4a667f0c7036a205bcd751a3 (patch) | |
tree | 3d194274878b1501bbe15428554d74aedafd0d56 /lib/type_conversion.h | |
parent | 338e24b48601a3cfdcde0977b6c9390d33d51c9f (diff) |
Render delegated renderer frames using the Qt scene graph.
This provides a stub implementation that renders quads and RenderPasses
using QSGNodes in QQuickWebEngineView.
The BackingStore code path is still supported when the delegated renderer
switch is not enabled. To use the new rendering, pass the following switches:
--enable-delegated-renderer --enable-threaded-compositing
This uses debug, plain color textures until we can fetch tiles and
textures from the ResourceProvider across OpenGL context boundaries.
Change-Id: I33ea0738dc5a326ef79c1435f75c044c42e8551f
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'lib/type_conversion.h')
-rw-r--r-- | lib/type_conversion.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/type_conversion.h b/lib/type_conversion.h index 51a543f73..2b7dee25b 100644 --- a/lib/type_conversion.h +++ b/lib/type_conversion.h @@ -42,9 +42,13 @@ #ifndef TYPE_CONVERSION_H #define TYPE_CONVERSION_H +#include <QMatrix4x4> +#include <QRect> #include <QString> #include <QUrl> #include "base/files/file_path.h" +#include "third_party/skia/include/utils/SkMatrix44.h" +#include "ui/gfx/rect.h" #include "url/gurl.h" inline QString toQt(const string16 &string) @@ -62,6 +66,25 @@ inline GURL toGurl(const QUrl& url) return GURL(url.toString().toStdString()); } +inline QRect toQt(const gfx::Rect &rect) +{ + return QRect(rect.x(), rect.y(), rect.width(), rect.height()); +} + +inline QSize toQt(const gfx::Size &size) +{ + return QSize(size.width(), size.height()); +} + +inline QMatrix4x4 toQt(const SkMatrix44 &m) +{ + return QMatrix4x4( + 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)); +} + inline base::FilePath::StringType toFilePathString(const QString &str) { #if defined(OS_POSIX) |