[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
girish at forwardbias.in
girish at forwardbias.in
Wed Dec 22 14:29:27 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 40853c25a785d309871dc212623d4e6500132fe4
Author: girish at forwardbias.in <girish at forwardbias.in@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Oct 11 19:45:06 2010 +0000
[Qt] Refactor Plugin X Pixmap painting code to a separate function
Reviewed by Kenneth Rohde Christiansen.
The refactored function will be used for rendering by the Accelerated
Composition enabled graphics layer.
https://bugs.webkit.org/show_bug.cgi?id=35524
* plugins/PluginView.h:
* plugins/qt/PluginViewQt.cpp:
(WebCore::PluginView::paintUsingXPixmap):
(WebCore::PluginView::paint):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 910b3ee..d8a6a1a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-10-11 Girish Ramakrishnan <girish at forwardbias.in>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Refactor Plugin X Pixmap painting code to a separate function
+
+ The refactored function will be used for rendering by the Accelerated
+ Composition enabled graphics layer.
+
+ https://bugs.webkit.org/show_bug.cgi?id=35524
+
+ * plugins/PluginView.h:
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::paintUsingXPixmap):
+ (WebCore::PluginView::paint):
+
2010-10-11 Andreas Kling <kling at webkit.org>
Reviewed by Dirk Schulze.
diff --git a/WebCore/plugins/PluginView.h b/WebCore/plugins/PluginView.h
index a61785c..96dba68 100644
--- a/WebCore/plugins/PluginView.h
+++ b/WebCore/plugins/PluginView.h
@@ -57,7 +57,7 @@ typedef PlatformWidget PlatformPluginWidget;
#include <QPixmap>
#endif
#endif
-#if PLATFORM(QT) && defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO >= 5)
+#if PLATFORM(QT)
#include <QImage>
class QPainter;
#endif
@@ -402,11 +402,16 @@ private:
void initXEvent(XEvent* event);
#endif
-#if PLATFORM(QT) && defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO >= 5)
+#if PLATFORM(QT)
+#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO >= 5)
QImage m_image;
bool m_renderToImage;
void paintUsingImageSurfaceExtension(QPainter* painter, const IntRect& exposedRect);
#endif
+#if defined(XP_UNIX) && ENABLE(NETSCAPE_PLUGIN_API)
+ void paintUsingXPixmap(QPainter* painter, const QRect &exposedRect);
+#endif
+#endif
IntRect m_clipRect; // The clip rect to apply to a windowed plug-in
IntRect m_windowRect; // Our window rect.
diff --git a/WebCore/plugins/qt/PluginViewQt.cpp b/WebCore/plugins/qt/PluginViewQt.cpp
index 55344c9..2f6bca9 100644
--- a/WebCore/plugins/qt/PluginViewQt.cpp
+++ b/WebCore/plugins/qt/PluginViewQt.cpp
@@ -237,40 +237,8 @@ void PluginView::paintUsingImageSurfaceExtension(QPainter* painter, const IntRec
}
#endif
-void PluginView::paint(GraphicsContext* context, const IntRect& rect)
+void PluginView::paintUsingXPixmap(QPainter* painter, const QRect &exposedRect)
{
- if (!m_isStarted) {
- paintMissingPluginIcon(context, rect);
- return;
- }
-
- if (context->paintingDisabled())
- return;
-
- setNPWindowIfNeeded();
-
- if (m_isWindowed)
- return;
-
- if (!m_drawable
-#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO >= 5)
- && m_image.isNull()
-#endif
- )
- return;
-
- QPainter* painter = context->platformContext();
- IntRect exposedRect(rect);
- exposedRect.intersect(frameRect());
- exposedRect.move(-frameRect().x(), -frameRect().y());
-
-#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO >= 5)
- if (!m_image.isNull()) {
- paintUsingImageSurfaceExtension(painter, exposedRect);
- return;
- }
-#endif
-
QPixmap qtDrawable = QPixmap::fromX11Pixmap(m_drawable, QPixmap::ExplicitlyShared);
const int drawableDepth = ((NPSetWindowCallbackStruct*)m_npWindow.ws_info)->depth;
ASSERT(drawableDepth == qtDrawable.depth());
@@ -328,8 +296,46 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
if (syncX)
XSync(m_pluginDisplay, false); // sync changes by plugin
- painter->drawPixmap(QPoint(frameRect().x() + exposedRect.x(), frameRect().y() + exposedRect.y()), qtDrawable,
- exposedRect);
+ painter->drawPixmap(QPoint(exposedRect.x(), exposedRect.y()), qtDrawable, exposedRect);
+}
+
+void PluginView::paint(GraphicsContext* context, const IntRect& rect)
+{
+ if (!m_isStarted) {
+ paintMissingPluginIcon(context, rect);
+ return;
+ }
+
+ if (context->paintingDisabled())
+ return;
+
+ setNPWindowIfNeeded();
+
+ if (m_isWindowed)
+ return;
+
+ if (!m_drawable
+#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO >= 5)
+ && m_image.isNull()
+#endif
+ )
+ return;
+
+ QPainter* painter = context->platformContext();
+ IntRect exposedRect(rect);
+ exposedRect.intersect(frameRect());
+ exposedRect.move(-frameRect().x(), -frameRect().y());
+
+#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO >= 5)
+ if (!m_image.isNull()) {
+ paintUsingImageSurfaceExtension(painter, exposedRect);
+ return;
+ }
+#endif
+
+ painter->translate(frameRect().x(), frameRect().y());
+ paintUsingXPixmap(painter, exposedRect);
+ painter->translate(-frameRect().x(), -frameRect().y());
}
// TODO: Unify across ports.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list