diff options
author | Zeno Albisser <zeno.albisser@digia.com> | 2013-06-05 20:58:06 +0200 |
---|---|---|
committer | Zeno Albisser <zeno.albisser@digia.com> | 2013-06-05 20:58:06 +0200 |
commit | db4b7526ad416469882373b87407d3c5ffb1d3cd (patch) | |
tree | 6ebdf87121e4ede2ccf6ac0d7dc6fd1548cd0cdb /lib/backing_store_qt.cpp | |
parent | 5f7883e96157733f38e28f4f03ef8e25ebd9fd73 (diff) |
Implement support for QtQuick2.
The current preliminary implementation uses the QQuickPaintedItem.
The RasterWindow is being replaced by an abstract NativeViewQt
class, which can be instantiated as QWidgetNativeView or QQuickNativeView.
The NativeViewContainerQt builds a wrapper around an instance of these classes
and serves as a common api towards chromium.
Due to the current design where the view is being created by the shell,
we introduce a browser_window.qml which provides a very basic browser UI.
The content is then being injected into an item within that browser window.
Just executing the example the "regular" way will launch the Widgets example.
To launch the QtQuick2 example, the environment variable QQUICKWEBENGINE must
be defined.
Diffstat (limited to 'lib/backing_store_qt.cpp')
-rw-r--r-- | lib/backing_store_qt.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/backing_store_qt.cpp b/lib/backing_store_qt.cpp index 70a801a56..8920b72c3 100644 --- a/lib/backing_store_qt.cpp +++ b/lib/backing_store_qt.cpp @@ -43,7 +43,6 @@ #include "content/browser/renderer_host/render_widget_host_impl.h" #include "content/public/browser/render_process_host.h" -#include "raster_window.h" #include "ui/gfx/rect.h" #include "ui/gfx/rect_conversions.h" @@ -78,11 +77,11 @@ void BackingStoreQt::resize(const QSize& size) } } -void BackingStoreQt::paintToTarget(QPainter* painter, const QRect& rect) +void BackingStoreQt::paintToTarget(QPainter* painter, const QRectF& rect) { if (m_pixelBuffer.isNull()) return; - painter->drawPixmap(rect, m_pixelBuffer); + painter->drawPixmap(rect, m_pixelBuffer, rect); } void BackingStoreQt::PaintToBackingStore(content::RenderProcessHost *process, |