[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 14:38:45 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 413d9c59c88982ff6f524600511b3ed24ccd0c25
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 14 19:29:25 2010 +0000
2010-10-14 Xan Lopez <xlopez at igalia.com>
Reviewed by Martin Robinson.
[GTK] Small cleanup in PluginViewGtk
https://bugs.webkit.org/show_bug.cgi?id=47588
Remove some dead code and use PlatformRefPtr for cairo surfaces.
No new tests, only refactoring.
* plugins/gtk/PluginViewGtk.cpp:
(WebCore::PluginView::paint):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d051cb9..a864c2c 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-10-14 Xan Lopez <xlopez at igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] Small cleanup in PluginViewGtk
+ https://bugs.webkit.org/show_bug.cgi?id=47588
+
+ Remove some dead code and use PlatformRefPtr for cairo surfaces.
+
+ No new tests, only refactoring.
+
+ * plugins/gtk/PluginViewGtk.cpp:
+ (WebCore::PluginView::paint):
+
2010-10-14 Dawit Alemayehu <adawit at kde.org>
Reviewed by Andreas Kling.
diff --git a/WebCore/plugins/gtk/PluginViewGtk.cpp b/WebCore/plugins/gtk/PluginViewGtk.cpp
index d0b3397..1b5fb02 100644
--- a/WebCore/plugins/gtk/PluginViewGtk.cpp
+++ b/WebCore/plugins/gtk/PluginViewGtk.cpp
@@ -193,29 +193,20 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
exposedRect.intersect(frameRect());
exposedRect.move(-frameRect().x(), -frameRect().y());
- Window dummyW;
- int dummyI;
- unsigned int dummyUI, actualDepth = 0;
- XGetGeometry(GDK_DISPLAY(), m_drawable, &dummyW, &dummyI, &dummyI,
- &dummyUI, &dummyUI, &dummyUI, &actualDepth);
-
- const unsigned int drawableDepth = ((NPSetWindowCallbackStruct*)m_npWindow.ws_info)->depth;
- ASSERT(drawableDepth == actualDepth);
-
- cairo_surface_t* drawableSurface = cairo_xlib_surface_create(GDK_DISPLAY(),
- m_drawable,
- m_visual,
- m_windowRect.width(),
- m_windowRect.height());
+ PlatformRefPtr<cairo_surface_t> drawableSurface = adoptPlatformRef(cairo_xlib_surface_create(GDK_DISPLAY(),
+ m_drawable,
+ m_visual,
+ m_windowRect.width(),
+ m_windowRect.height()));
if (m_isTransparent) {
// If we have a 32 bit drawable and the plugin wants transparency,
// we'll clear the exposed area to transparent first. Otherwise,
// we'd end up with junk in there from the last paint, or, worse,
// uninitialized data.
- PlatformRefPtr<cairo_t> cr = adoptPlatformRef(cairo_create(drawableSurface));
+ PlatformRefPtr<cairo_t> cr = adoptPlatformRef(cairo_create(drawableSurface.get()));
- if (!(cairo_surface_get_content(drawableSurface) & CAIRO_CONTENT_ALPHA)) {
+ if (!(cairo_surface_get_content(drawableSurface.get()) & CAIRO_CONTENT_ALPHA)) {
// Attempt to fake it when we don't have an alpha channel on our
// pixmap. If that's not possible, at least clear the window to
// avoid drawing artifacts.
@@ -251,7 +242,7 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
cairo_t* cr = context->platformContext();
cairo_save(cr);
- cairo_set_source_surface(cr, drawableSurface, frameRect().x(), frameRect().y());
+ cairo_set_source_surface(cr, drawableSurface.get(), frameRect().x(), frameRect().y());
cairo_rectangle(cr,
frameRect().x() + exposedRect.x(), frameRect().y() + exposedRect.y(),
@@ -265,7 +256,6 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
cairo_paint(cr);
cairo_restore(cr);
- cairo_surface_destroy(drawableSurface);
#endif // defined(XP_UNIX)
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list