Title: [167195] trunk/Source
Revision
167195
Author
commit-qu...@webkit.org
Date
2014-04-13 04:23:23 -0700 (Sun, 13 Apr 2014)

Log Message

Unreviewed, rolling out r167168 and r167194.
https://bugs.webkit.org/show_bug.cgi?id=131589

Caused massive ASSERTION failures on the GTK Debug bot
(Requested by philn on #webkit).

Reverted changesets:

"[GTK] Add HighDPI support for non-accelerated compositing
contents"
https://bugs.webkit.org/show_bug.cgi?id=131562
http://trac.webkit.org/changeset/167168

Source/WebCore:

"Unreviewed. Fix GTK+ build with recent cairo and GTK+ after
r167168."
http://trac.webkit.org/changeset/167194

Source/WebKit2:

"Unreviewed. Fix GTK+ build with recent cairo and GTK+ after
r167168."
http://trac.webkit.org/changeset/167194

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (167194 => 167195)


--- trunk/Source/WebCore/ChangeLog	2014-04-13 09:46:34 UTC (rev 167194)
+++ trunk/Source/WebCore/ChangeLog	2014-04-13 11:23:23 UTC (rev 167195)
@@ -1,3 +1,22 @@
+2014-04-13  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, rolling out r167168 and r167194.
+        https://bugs.webkit.org/show_bug.cgi?id=131589
+
+        Caused massive ASSERTION failures on the GTK Debug bot
+        (Requested by philn on #webkit).
+
+        Reverted changesets:
+
+        "[GTK] Add HighDPI support for non-accelerated compositing
+        contents"
+        https://bugs.webkit.org/show_bug.cgi?id=131562
+        http://trac.webkit.org/changeset/167168
+
+        "Unreviewed. Fix GTK+ build with recent cairo and GTK+ after
+        r167168."
+        http://trac.webkit.org/changeset/167194
+
 2014-04-13  Youenn Fablet  <youenn.fab...@crf.canon.fr>
 
         [GStreamer] No CORS support for media elements

Modified: trunk/Source/WebCore/platform/cairo/WidgetBackingStore.h (167194 => 167195)


--- trunk/Source/WebCore/platform/cairo/WidgetBackingStore.h	2014-04-13 09:46:34 UTC (rev 167194)
+++ trunk/Source/WebCore/platform/cairo/WidgetBackingStore.h	2014-04-13 11:23:23 UTC (rev 167195)
@@ -49,17 +49,11 @@
     virtual cairo_surface_t* cairoSurface() = 0;
     virtual void scroll(const IntRect& scrollRect, const IntSize& scrollOffset) = 0;
     const IntSize& size() { return m_size; }
-
-    WidgetBackingStore(const IntSize& size, float deviceScaleFactor)
-        : m_size(size)
-        , m_deviceScaleFactor(deviceScaleFactor)
-    { }
-
+    WidgetBackingStore(const IntSize& size) : m_size(size) { }
     virtual ~WidgetBackingStore() { }
 
-protected:
+private:
     IntSize m_size;
-    float m_deviceScaleFactor;
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/cairo/WidgetBackingStoreCairo.cpp (167194 => 167195)


--- trunk/Source/WebCore/platform/cairo/WidgetBackingStoreCairo.cpp	2014-04-13 09:46:34 UTC (rev 167194)
+++ trunk/Source/WebCore/platform/cairo/WidgetBackingStoreCairo.cpp	2014-04-13 11:23:23 UTC (rev 167195)
@@ -26,10 +26,8 @@
 
 namespace WebCore {
 
-static PassRefPtr<cairo_surface_t> createSurfaceForBackingStore(PlatformWidget widget, IntSize size, float deviceScaleFactor)
+static PassRefPtr<cairo_surface_t> createSurfaceForBackingStore(PlatformWidget widget, const IntSize& size)
 {
-    size.scale(deviceScaleFactor);
-
 #if PLATFORM(GTK)
     return adoptRef(gdk_window_create_similar_surface(gtk_widget_get_window(widget), CAIRO_CONTENT_COLOR_ALPHA, size.width(), size.height()));
 #else
@@ -38,20 +36,20 @@
 #endif
 }
 
-PassOwnPtr<WidgetBackingStore> WidgetBackingStoreCairo::create(PlatformWidget widget, const IntSize& size, float deviceScaleFactor)
+PassOwnPtr<WidgetBackingStore> WidgetBackingStoreCairo::create(PlatformWidget widget, const IntSize& size)
 {
-    return adoptPtr(new WidgetBackingStoreCairo(widget, size, deviceScaleFactor));
+    return adoptPtr(new WidgetBackingStoreCairo(widget, size));
 }
 
 // We keep two copies of the surface here, which will double the memory usage, but increase
 // scrolling performance since we do not have to keep reallocating a memory region during
 // quick scrolling requests.
-WidgetBackingStoreCairo::WidgetBackingStoreCairo(PlatformWidget widget, const IntSize& size, float deviceScaleFactor)
-    : WidgetBackingStore(size, deviceScaleFactor)
-    , m_surface(createSurfaceForBackingStore(widget, size, deviceScaleFactor))
-    , m_scrollSurface(createSurfaceForBackingStore(widget, size, deviceScaleFactor))
+WidgetBackingStoreCairo::WidgetBackingStoreCairo(PlatformWidget widget, const IntSize& size)
+    : WidgetBackingStore(size)
+    , m_surface(createSurfaceForBackingStore(widget, size))
+    , m_scrollSurface(createSurfaceForBackingStore(widget, size))
+
 {
-    cairoSurfaceSetDeviceScale(m_surface.get(), deviceScaleFactor, deviceScaleFactor);
 }
 
 WidgetBackingStoreCairo::~WidgetBackingStoreCairo()

Modified: trunk/Source/WebCore/platform/cairo/WidgetBackingStoreCairo.h (167194 => 167195)


--- trunk/Source/WebCore/platform/cairo/WidgetBackingStoreCairo.h	2014-04-13 09:46:34 UTC (rev 167194)
+++ trunk/Source/WebCore/platform/cairo/WidgetBackingStoreCairo.h	2014-04-13 11:23:23 UTC (rev 167195)
@@ -27,8 +27,8 @@
 class WidgetBackingStoreCairo : public WidgetBackingStore {
 
 public:
-    static PassOwnPtr<WidgetBackingStore> create(PlatformWidget, const IntSize&, float deviceScaleFactor);
-    WidgetBackingStoreCairo(PlatformWidget, const IntSize&, float deviceScaleFactor);
+    static PassOwnPtr<WidgetBackingStore> create(PlatformWidget, const IntSize&);
+    WidgetBackingStoreCairo(PlatformWidget, const IntSize&);
     ~WidgetBackingStoreCairo();
     cairo_surface_t* cairoSurface();
     void scroll(const IntRect&, const IntSize&);

Modified: trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp (167194 => 167195)


--- trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp	2014-04-13 09:46:34 UTC (rev 167194)
+++ trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp	2014-04-13 11:23:23 UTC (rev 167195)
@@ -36,7 +36,6 @@
 #include "Path.h"
 #include "PlatformPathCairo.h"
 #include "RefPtrCairo.h"
-#include <wtf/Assertions.h>
 #include <wtf/Vector.h>
 
 #if ENABLE(ACCELERATED_2D_CANVAS)
@@ -260,15 +259,4 @@
     }
 }
 
-void cairoSurfaceSetDeviceScale(cairo_surface_t* surface, double xScale, double yScale)
-{
-    // This function was added pretty much simultaneous to when 1.13 was branched.
-#if HAVE(CAIRO_SURFACE_SET_DEVICE_SCALE)
-    cairo_surface_set_device_scale(surface, xScale, yScale);
-#else
-    UNUSED_PARAM(surface);
-    ASSERT_UNUSED(xScale, 1 == xScale);
-    ASSERT_UNUSED(yScale, 1 == yScale);
-#endif
-}
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.h (167194 => 167195)


--- trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.h	2014-04-13 09:46:34 UTC (rev 167194)
+++ trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.h	2014-04-13 11:23:23 UTC (rev 167195)
@@ -31,9 +31,6 @@
 #include "IntSize.h"
 #include <cairo.h>
 
-// This function was added pretty much simultaneous to when 1.13 was branched.
-#define HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE CAIRO_VERSION_MAJOR > 1 || (CAIRO_VERSION_MAJOR == 1 && CAIRO_VERSION_MINOR >= 13)
-
 namespace WebCore {
 class AffineTransform;
 class Color;
@@ -59,7 +56,6 @@
 void copyRectFromOneSurfaceToAnother(cairo_surface_t* from, cairo_surface_t* to, const IntSize& offset, const IntRect&, const IntSize& = IntSize(), cairo_operator_t = CAIRO_OPERATOR_OVER);
 
 IntSize cairoSurfaceSize(cairo_surface_t*);
-void cairoSurfaceSetDeviceScale(cairo_surface_t*, double xScale, double yScale);
 
 } // namespace WebCore
 

Modified: trunk/Source/WebCore/platform/gtk/WidgetBackingStoreGtkX11.cpp (167194 => 167195)


--- trunk/Source/WebCore/platform/gtk/WidgetBackingStoreGtkX11.cpp	2014-04-13 09:46:34 UTC (rev 167194)
+++ trunk/Source/WebCore/platform/gtk/WidgetBackingStoreGtkX11.cpp	2014-04-13 11:23:23 UTC (rev 167195)
@@ -19,7 +19,6 @@
 #include "config.h"
 #include "WidgetBackingStoreGtkX11.h"
 
-#include "CairoUtilities.h"
 #include "GtkVersioning.h"
 #include "RefPtrCairo.h"
 #include <cairo-xlib.h>
@@ -28,28 +27,23 @@
 
 namespace WebCore {
 
-PassOwnPtr<WidgetBackingStore> WidgetBackingStoreGtkX11::create(GtkWidget* widget, const IntSize& size, float deviceScaleFactor)
+PassOwnPtr<WidgetBackingStore> WidgetBackingStoreGtkX11::create(GtkWidget* widget, const IntSize& size)
 {
-    return adoptPtr(new WidgetBackingStoreGtkX11(widget, size, deviceScaleFactor));
+    return adoptPtr(new WidgetBackingStoreGtkX11(widget, size));
 }
 
-WidgetBackingStoreGtkX11::WidgetBackingStoreGtkX11(GtkWidget* widget, const IntSize& size, float deviceScaleFactor)
-    : WidgetBackingStore(size, deviceScaleFactor)
+WidgetBackingStoreGtkX11::WidgetBackingStoreGtkX11(GtkWidget* widget, const IntSize& size)
+    : WidgetBackingStore(size)
 {
-    IntSize scaledSize = size;
-    scaledSize.scale(deviceScaleFactor);
-
     GdkVisual* visual = gtk_widget_get_visual(widget);
     GdkScreen* screen = gdk_visual_get_screen(visual);
     m_display = GDK_SCREEN_XDISPLAY(screen);
     m_pixmap = XCreatePixmap(m_display, GDK_WINDOW_XID(gdk_screen_get_root_window(screen)),
-        scaledSize.width(), scaledSize.height(), gdk_visual_get_depth(visual));
+        size.width(), size.height(), gdk_visual_get_depth(visual));
     m_gc = XCreateGC(m_display, m_pixmap, 0, 0);
 
     m_surface = adoptRef(cairo_xlib_surface_create(m_display, m_pixmap,
-        GDK_VISUAL_XVISUAL(visual), scaledSize.width(), scaledSize.height()));
-
-    cairoSurfaceSetDeviceScale(m_surface.get(), deviceScaleFactor, deviceScaleFactor);
+        GDK_VISUAL_XVISUAL(visual), size.width(), size.height()));
 }
 
 WidgetBackingStoreGtkX11::~WidgetBackingStoreGtkX11()
@@ -73,14 +67,9 @@
     if (targetRect.isEmpty())
         return;
 
-    targetRect.scale(m_deviceScaleFactor);
-
-    IntSize scaledScrollOffset = scrollOffset;
-    scaledScrollOffset.scale(m_deviceScaleFactor);
-
     cairo_surface_flush(m_surface.get());
     XCopyArea(m_display, m_pixmap, m_pixmap, m_gc, 
-        targetRect.x() - scaledScrollOffset.width(), targetRect.y() - scaledScrollOffset.height(),
+        targetRect.x() - scrollOffset.width(), targetRect.y() - scrollOffset.height(),
         targetRect.width(), targetRect.height(),
         targetRect.x(), targetRect.y());
     cairo_surface_mark_dirty_rectangle(m_surface.get(),

Modified: trunk/Source/WebCore/platform/gtk/WidgetBackingStoreGtkX11.h (167194 => 167195)


--- trunk/Source/WebCore/platform/gtk/WidgetBackingStoreGtkX11.h	2014-04-13 09:46:34 UTC (rev 167194)
+++ trunk/Source/WebCore/platform/gtk/WidgetBackingStoreGtkX11.h	2014-04-13 11:23:23 UTC (rev 167195)
@@ -29,8 +29,8 @@
 class WidgetBackingStoreGtkX11 : public WidgetBackingStore {
 
 public:
-    static PassOwnPtr<WidgetBackingStore> create(GtkWidget*, const IntSize&, float deviceScaleFactor);
-    WidgetBackingStoreGtkX11(GtkWidget*, const IntSize&, float deviceScaleFactor);
+    static PassOwnPtr<WidgetBackingStore> create(GtkWidget*, const IntSize&);
+    WidgetBackingStoreGtkX11(GtkWidget*, const IntSize&);
     ~WidgetBackingStoreGtkX11();
     cairo_surface_t* cairoSurface();
     void scroll(const IntRect& scrollRect, const IntSize& scrollOffset);

Modified: trunk/Source/WebKit2/ChangeLog (167194 => 167195)


--- trunk/Source/WebKit2/ChangeLog	2014-04-13 09:46:34 UTC (rev 167194)
+++ trunk/Source/WebKit2/ChangeLog	2014-04-13 11:23:23 UTC (rev 167195)
@@ -1,3 +1,22 @@
+2014-04-13  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, rolling out r167168 and r167194.
+        https://bugs.webkit.org/show_bug.cgi?id=131589
+
+        Caused massive ASSERTION failures on the GTK Debug bot
+        (Requested by philn on #webkit).
+
+        Reverted changesets:
+
+        "[GTK] Add HighDPI support for non-accelerated compositing
+        contents"
+        https://bugs.webkit.org/show_bug.cgi?id=131562
+        http://trac.webkit.org/changeset/167168
+
+        "Unreviewed. Fix GTK+ build with recent cairo and GTK+ after
+        r167168."
+        http://trac.webkit.org/changeset/167194
+
 2014-04-13  Carlos Garcia Campos  <cgar...@igalia.com>
 
         Unreviewed. Fix GTK+ build with recent cairo and GTK+ after r167168.

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp (167194 => 167195)


--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp	2014-04-13 09:46:34 UTC (rev 167194)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp	2014-04-13 11:23:23 UTC (rev 167195)
@@ -46,7 +46,6 @@
 #include "WebPageProxy.h"
 #include "WebPreferences.h"
 #include "WebViewBaseInputMethodFilter.h"
-#include <WebCore/CairoUtilities.h>
 #include <WebCore/ClipboardUtilitiesGtk.h>
 #include <WebCore/DataObjectGtk.h>
 #include <WebCore/DragData.h>
@@ -79,10 +78,6 @@
 #include <WebCore/RedirectedXCompositeWindow.h>
 #endif
 
-// gtk_widget_get_scale_factor() appeared in GTK 3.10, but we also need
-// to make sure we have cairo new enough to support cairo_surface_set_device_scale
-#define HAVE_GTK_SCALE_FACTOR HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE && GTK_CHECK_VERSION(3, 10, 0)
-
 using namespace WebKit;
 using namespace WebCore;
 
@@ -966,15 +961,6 @@
     priv->pageProxy->pageGroup().preferences().setAcceleratedCompositingEnabled(false);
 }
 
-#if HAVE(GTK_SCALE_FACTOR)
-static void scaleFactorChanged(GObject* object, GParamSpec*)
-{
-    WebKitWebViewBasePrivate* priv = WEBKIT_WEB_VIEW_BASE(object)->priv;
-    ASSERT(priv->pageProxy);
-    priv->pageProxy->setIntrinsicDeviceScaleFactor(gtk_widget_get_scale_factor(GTK_WIDGET(object)));
-}
-#endif // HAVE(GTK_SCALE_FACTOR)
-
 void webkitWebViewBaseCreateWebPage(WebKitWebViewBase* webkitWebViewBase, WebContext* context, WebPageGroup* pageGroup, WebPageProxy* relatedPage)
 {
     WebKitWebViewBasePrivate* priv = webkitWebViewBase->priv;
@@ -990,12 +976,6 @@
         priv->pageProxy->setAcceleratedCompositingWindowId(priv->redirectedWindow->windowId());
 #endif
 
-#if HAVE(GTK_SCALE_FACTOR)
-    // We attach this here, because changes in scale factor are passed directly to the page proxy.
-    priv->pageProxy->setIntrinsicDeviceScaleFactor(gtk_widget_get_scale_factor(GTK_WIDGET(webkitWebViewBase)));
-    g_signal_connect(webkitWebViewBase, "notify::scale-factor", G_CALLBACK(scaleFactorChanged), nullptr);
-#endif
-
     webkitWebViewBaseUpdatePreferences(webkitWebViewBase);
 
     // This must happen here instead of the instance initializer, because the input method

Modified: trunk/Source/WebKit2/UIProcess/cairo/BackingStoreCairo.cpp (167194 => 167195)


--- trunk/Source/WebKit2/UIProcess/cairo/BackingStoreCairo.cpp	2014-04-13 09:46:34 UTC (rev 167194)
+++ trunk/Source/WebKit2/UIProcess/cairo/BackingStoreCairo.cpp	2014-04-13 11:23:23 UTC (rev 167195)
@@ -48,14 +48,14 @@
 namespace WebKit {
 
 #if PLATFORM(GTK)
-static OwnPtr<WidgetBackingStore> createBackingStoreForGTK(GtkWidget* widget, const IntSize& size, float deviceScaleFactor)
+static OwnPtr<WidgetBackingStore> createBackingStoreForGTK(GtkWidget* widget, const IntSize& size)
 {
 #if PLATFORM(X11) && defined(GDK_WINDOWING_X11)
     GdkDisplay* display = gdk_display_manager_get_default_display(gdk_display_manager_get());
     if (GDK_IS_X11_DISPLAY(display))
-        return WebCore::WidgetBackingStoreGtkX11::create(widget, size, deviceScaleFactor);
+        return WebCore::WidgetBackingStoreGtkX11::create(widget, size);
 #endif
-    return WebCore::WidgetBackingStoreCairo::create(widget, size, deviceScaleFactor);
+    return WebCore::WidgetBackingStoreCairo::create(widget, size);
 }
 #endif
 
@@ -73,9 +73,9 @@
 {
     if (!m_backingStore)
 #if PLATFORM(EFL)
-        m_backingStore = WidgetBackingStoreCairo::create(EwkView::toEvasObject(toAPI(m_webPageProxy)), size(), deviceScaleFactor());
+        m_backingStore = WidgetBackingStoreCairo::create(EwkView::toEvasObject(toAPI(m_webPageProxy)), size());
 #else
-        m_backingStore = createBackingStoreForGTK(m_webPageProxy->viewWidget(), size(), deviceScaleFactor());
+        m_backingStore = createBackingStoreForGTK(m_webPageProxy->viewWidget(), size());
 #endif
 
     scroll(updateInfo.scrollRect, updateInfo.scrollOffset);
@@ -88,7 +88,7 @@
         IntRect updateRect = updateInfo.updateRects[i];
         IntRect srcRect = updateRect;
         srcRect.move(-updateRectLocation.x(), -updateRectLocation.y());
-        bitmap->paint(graphicsContext, deviceScaleFactor(), updateRect.location(), srcRect);
+        bitmap->paint(graphicsContext, updateRect.location(), srcRect);
     }
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to