summaryrefslogtreecommitdiffstats
path: root/lib/type_conversion.h
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2013-11-13 14:17:00 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-15 13:49:20 +0100
commitb83153f1f790614b4807a607990f87557a332bfc (patch)
tree0c16b78b16092134984cbf02bc636c0c30ef33d4 /lib/type_conversion.h
parentb6039e76c2ecfd6b95359d6ac1bc7ecbd6c1d9c5 (diff)
Delegated renderer: implement cc::DrawQuad::SOLID_COLOR.
I could currently only test this with --enable-overlay-scrollbars. Background color quads still need some work in Chromium to be able to to use this kind of quads, see <http://code.google.com/p/chromium/issues/detail?id=114658>. Change-Id: I9c9bdb5c72b91827cfdb7e38e44755c6361a05cf Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'lib/type_conversion.h')
-rw-r--r--lib/type_conversion.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/type_conversion.h b/lib/type_conversion.h
index ce3423e63..0f0a8ab60 100644
--- a/lib/type_conversion.h
+++ b/lib/type_conversion.h
@@ -42,12 +42,14 @@
#ifndef TYPE_CONVERSION_H
#define TYPE_CONVERSION_H
+#include <QColor>
#include <QMatrix4x4>
#include <QRect>
#include <QString>
#include <QUrl>
#include "base/files/file_path.h"
#include "third_party/skia/include/utils/SkMatrix44.h"
+#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/rect.h"
#include "url/gurl.h"
@@ -96,6 +98,11 @@ inline QSizeF toQt(const gfx::SizeF &size)
return QSizeF(size.width(), size.height());
}
+inline QColor toQt(const SkColor &c)
+{
+ return QColor(SkColorGetR(c), SkColorGetG(c), SkColorGetB(c), SkColorGetA(c));
+}
+
inline QMatrix4x4 toQt(const SkMatrix44 &m)
{
return QMatrix4x4(