diff options
author | Jüri Valdmann <juri.valdmann@qt.io> | 2020-07-08 12:52:05 +0200 |
---|---|---|
committer | Jüri Valdmann <juri.valdmann@qt.io> | 2020-07-15 14:38:49 +0200 |
commit | 561d82242f67bb9b0520bfa04f05623f359171e2 (patch) | |
tree | 95701c385b77647bd4b0c3426b5813cf27649a93 | |
parent | 333a302974216a8f943696f7916a4a944f89b51b (diff) | |
download | qtwebengine-561d82242f67bb9b0520bfa04f05623f359171e2.tar.gz |
Delete copySurface method from RWHVQDelegate
Not used anymore.
Change-Id: I234012c9c611c0dce4d1d2f83e9222e60207f630
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
6 files changed, 0 insertions, 24 deletions
diff --git a/src/core/render_widget_host_view_qt_delegate.h b/src/core/render_widget_host_view_qt_delegate.h index f5227bd52..dfbd3b26a 100644 --- a/src/core/render_widget_host_view_qt_delegate.h +++ b/src/core/render_widget_host_view_qt_delegate.h @@ -85,7 +85,6 @@ public: virtual void inputMethodStateChanged(bool editorVisible, bool passwordInput) = 0; virtual void setInputMethodHints(Qt::InputMethodHints hints) = 0; virtual void setClearColor(const QColor &color) = 0; - virtual bool copySurface(const QRect &, const QSize &, QImage &) = 0; virtual void unhandledWheelEvent(QWheelEvent *) {} }; diff --git a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp index 60340079f..98d794960 100644 --- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp +++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp @@ -405,17 +405,6 @@ void RenderWidgetHostViewQtDelegateQuick::onHide() m_client->forwardEvent(&event); } -bool RenderWidgetHostViewQtDelegateQuick::copySurface(const QRect &rect, const QSize &size, QImage &image) -{ - image = QQuickItem::window()->grabWindow(); - if (image.isNull()) - return false; - QRect subrect = !rect.isEmpty() ? rect : image.rect(); - image = image.copy(subrect); - image = image.scaled(size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); - return true; -} - #if QT_CONFIG(accessibility) RenderWidgetHostViewQtDelegateQuickAccessible::RenderWidgetHostViewQtDelegateQuickAccessible(RenderWidgetHostViewQtDelegateQuick *o, QQuickWebEngineView *view) : QAccessibleObject(o) diff --git a/src/webengine/render_widget_host_view_qt_delegate_quick.h b/src/webengine/render_widget_host_view_qt_delegate_quick.h index cb38ebd20..d7ff0ffe9 100644 --- a/src/webengine/render_widget_host_view_qt_delegate_quick.h +++ b/src/webengine/render_widget_host_view_qt_delegate_quick.h @@ -83,7 +83,6 @@ public: void setInputMethodHints(Qt::InputMethodHints) override { } // The QtQuick view doesn't have a backbuffer of its own and doesn't need this void setClearColor(const QColor &) override { } - bool copySurface(const QRect &rect, const QSize &size, QImage &image) override; void readyToSwap() override; diff --git a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.h b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.h index cff189d1c..c05e14266 100644 --- a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.h +++ b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.h @@ -72,7 +72,6 @@ public: void inputMethodStateChanged(bool, bool) override {} void setInputMethodHints(Qt::InputMethodHints) override { } void setClearColor(const QColor &) override { } - bool copySurface(const QRect &, const QSize &, QImage &) override { return false; } void setVirtualParent(QQuickItem *virtualParent); diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp index f9a7b036e..5f674f239 100644 --- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp +++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp @@ -434,15 +434,6 @@ void RenderWidgetHostViewQtDelegateWidget::hideEvent(QHideEvent *event) m_client->notifyHidden(); } -bool RenderWidgetHostViewQtDelegateWidget::copySurface(const QRect &rect, const QSize &size, QImage &image) -{ - QPixmap pixmap = rect.isEmpty() ? QQuickWidget::grab(QQuickWidget::rect()) : QQuickWidget::grab(rect); - if (pixmap.isNull()) - return false; - image = pixmap.toImage().scaled(size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); - return true; -} - bool RenderWidgetHostViewQtDelegateWidget::event(QEvent *event) { bool handled = false; diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h index 57b272183..0dd5f1cc3 100644 --- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h +++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h @@ -85,7 +85,6 @@ public: void inputMethodStateChanged(bool editorVisible, bool passwordInput) override; void setInputMethodHints(Qt::InputMethodHints) override; void setClearColor(const QColor &color) override; - bool copySurface(const QRect &, const QSize &, QImage &) override; void unhandledWheelEvent(QWheelEvent *ev) override; protected: |