Title: [109755] trunk
Revision
109755
Author
commit-qu...@webkit.org
Date
2012-03-05 09:15:48 -0800 (Mon, 05 Mar 2012)

Log Message

Unreviewed, rolling out r109748.
http://trac.webkit.org/changeset/109748
https://bugs.webkit.org/show_bug.cgi?id=80296

Made some tests crash, will fix and recommit (Requested by
noamr on #webkit).

Patch by Sheriff Bot <webkit.review....@gmail.com> on 2012-03-05

Source/WebKit2:

* Target.pri:
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPagePrivate::paintToCurrentGLContext):
(PageProxyNode::PageProxyNode):
(PageProxyNode):
(PageProxyNode::changedStates):
(PageProxyNode::render):
(PageProxyNode::~PageProxyNode):
(QQuickWebPage::updatePaintNode):
(QQuickWebPagePrivate::updateSize):
(QQuickWebPagePrivate::resetPaintNode):
(QQuickWebPagePrivate::~QQuickWebPagePrivate):
* UIProcess/API/qt/qquickwebpage_p_p.h:
(QQuickWebPagePrivate):
* UIProcess/DrawingAreaProxy.h:
(WebKit):
(WebKit::DrawingAreaProxy::layerTreeHostProxy):
(DrawingAreaProxy):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
(WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
* UIProcess/LayerTreeHostProxy.h:
(LayerTreeHostProxy):
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::syncAnimations):
(WebKit::LayerTreeHostProxy::updateViewport):
(WebKit::LayerTreeHostProxy::syncLayerParameters):
(WebKit::LayerTreeHostProxy::flushLayerChanges):
(WebKit::LayerTreeHostProxy::ensureRootLayer):
(WebKit::LayerTreeHostProxy::syncRemoteContent):
(WebKit::LayerTreeHostProxy::dispatchUpdate):
(WebKit):
(WebKit::LayerTreeHostProxy::createDirectlyCompositedImage):
(WebKit::LayerTreeHostProxy::purgeGLResources):
* UIProcess/qt/QtWebPageSGNode.cpp: Removed.
* UIProcess/qt/QtWebPageSGNode.h: Removed.

Tools:

* MiniBrowser/qt/main.cpp:
(main):

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (109754 => 109755)


--- trunk/Source/WebKit2/ChangeLog	2012-03-05 16:55:37 UTC (rev 109754)
+++ trunk/Source/WebKit2/ChangeLog	2012-03-05 17:15:48 UTC (rev 109755)
@@ -1,3 +1,49 @@
+2012-03-05  Sheriff Bot  <webkit.review....@gmail.com>
+
+        Unreviewed, rolling out r109748.
+        http://trac.webkit.org/changeset/109748
+        https://bugs.webkit.org/show_bug.cgi?id=80296
+
+        Made some tests crash, will fix and recommit (Requested by
+        noamr on #webkit).
+
+        * Target.pri:
+        * UIProcess/API/qt/qquickwebpage.cpp:
+        (QQuickWebPagePrivate::paintToCurrentGLContext):
+        (PageProxyNode::PageProxyNode):
+        (PageProxyNode):
+        (PageProxyNode::changedStates):
+        (PageProxyNode::render):
+        (PageProxyNode::~PageProxyNode):
+        (QQuickWebPage::updatePaintNode):
+        (QQuickWebPagePrivate::updateSize):
+        (QQuickWebPagePrivate::resetPaintNode):
+        (QQuickWebPagePrivate::~QQuickWebPagePrivate):
+        * UIProcess/API/qt/qquickwebpage_p_p.h:
+        (QQuickWebPagePrivate):
+        * UIProcess/DrawingAreaProxy.h:
+        (WebKit):
+        (WebKit::DrawingAreaProxy::layerTreeHostProxy):
+        (DrawingAreaProxy):
+        * UIProcess/DrawingAreaProxyImpl.cpp:
+        (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
+        (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
+        * UIProcess/LayerTreeHostProxy.h:
+        (LayerTreeHostProxy):
+        * UIProcess/qt/LayerTreeHostProxyQt.cpp:
+        (WebKit::LayerTreeHostProxy::syncAnimations):
+        (WebKit::LayerTreeHostProxy::updateViewport):
+        (WebKit::LayerTreeHostProxy::syncLayerParameters):
+        (WebKit::LayerTreeHostProxy::flushLayerChanges):
+        (WebKit::LayerTreeHostProxy::ensureRootLayer):
+        (WebKit::LayerTreeHostProxy::syncRemoteContent):
+        (WebKit::LayerTreeHostProxy::dispatchUpdate):
+        (WebKit):
+        (WebKit::LayerTreeHostProxy::createDirectlyCompositedImage):
+        (WebKit::LayerTreeHostProxy::purgeGLResources):
+        * UIProcess/qt/QtWebPageSGNode.cpp: Removed.
+        * UIProcess/qt/QtWebPageSGNode.h: Removed.
+
 2012-03-05  Joone Hur  <joone....@collabora.co.uk>
 
         [GTK] zlib link error with --enable-webkit2

Modified: trunk/Source/WebKit2/Target.pri (109754 => 109755)


--- trunk/Source/WebKit2/Target.pri	2012-03-05 16:55:37 UTC (rev 109754)
+++ trunk/Source/WebKit2/Target.pri	2012-03-05 17:15:48 UTC (rev 109755)
@@ -261,7 +261,6 @@
     UIProcess/qt/QtGestureRecognizer.h \
     UIProcess/qt/QtPanGestureRecognizer.h \
     UIProcess/qt/QtPinchGestureRecognizer.h \
-    UIProcess/qt/QtWebPageSGNode.h \
     UIProcess/qt/QtTapGestureRecognizer.h \
     UIProcess/qt/QtWebError.h \
     UIProcess/qt/QtDialogRunner.h \
@@ -593,7 +592,6 @@
     UIProcess/qt/QtGestureRecognizer.cpp \
     UIProcess/qt/QtPanGestureRecognizer.cpp \
     UIProcess/qt/QtPinchGestureRecognizer.cpp \
-    UIProcess/qt/QtWebPageSGNode.cpp \
     UIProcess/qt/QtTapGestureRecognizer.cpp \
     UIProcess/qt/QtWebError.cpp \
     UIProcess/qt/QtDialogRunner.cpp \

Modified: trunk/Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp (109754 => 109755)


--- trunk/Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp	2012-03-05 16:55:37 UTC (rev 109754)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp	2012-03-05 17:15:48 UTC (rev 109755)
@@ -23,10 +23,13 @@
 
 #include "LayerTreeHostProxy.h"
 #include "QtWebPageEventHandler.h"
-#include "QtWebPageSGNode.h"
 #include "TransformationMatrix.h"
 #include "qquickwebpage_p_p.h"
 #include "qquickwebview_p.h"
+#include <QtQuick/QQuickCanvas>
+#include <QtQuick/QSGGeometryNode>
+#include <QtQuick/QSGMaterial>
+#include <private/qsgrendernode_p.h>
 
 QQuickWebPage::QQuickWebPage(QQuickWebView* viewportItem)
     : QQuickItem(viewportItem)
@@ -74,7 +77,51 @@
         webPageProxy->drawingArea()->paintLayerTree(painter);
 }
 
+void QQuickWebPagePrivate::paintToCurrentGLContext(const QTransform& transform, float opacity)
+{
+    if (!q->isVisible())
+        return;
 
+    QRectF clipRect = viewportItem->mapRectToScene(viewportItem->boundingRect());
+
+    if (!clipRect.isValid())
+        return;
+
+    DrawingAreaProxy* drawingArea = webPageProxy->drawingArea();
+    if (!drawingArea)
+        return;
+
+    drawingArea->paintToCurrentGLContext(QTransform(transform).scale(contentsScale, contentsScale), opacity, clipRect);
+}
+
+struct PageProxyNode : public QSGRenderNode {
+    PageProxyNode(QQuickWebPagePrivate* page)
+        : m_pagePrivate(page)
+    {
+    }
+
+    virtual StateFlags changedStates()
+    {
+        return StateFlags(StencilState) | ColorState | BlendState;
+    }
+
+    virtual void render(const RenderState&)
+    {
+        if (!m_pagePrivate)
+            return;
+        QTransform transform = matrix() ? matrix()->toTransform() : QTransform();
+        m_pagePrivate->paintToCurrentGLContext(transform, inheritedOpacity());
+    }
+
+    ~PageProxyNode()
+    {
+        if (m_pagePrivate)
+            m_pagePrivate->resetPaintNode();
+    }
+
+    QQuickWebPagePrivate* m_pagePrivate;
+};
+
 QSGNode* QQuickWebPage::updatePaintNode(QSGNode* oldNode, UpdatePaintNodeData*)
 {
     if (!(flags() & ItemHasContents)) {
@@ -83,16 +130,13 @@
         return 0;
     }
 
-    QtWebPageSGNode* sceneNode = static_cast<QtWebPageSGNode*>(oldNode);
-    if (sceneNode)
-        return sceneNode;
-    sceneNode = new QtWebPageSGNode(d->webPageProxy->drawingArea()->layerTreeHostProxy(), d);
-    {
-        MutexLocker lock(d->m_paintNodeMutex);
-        d->m_paintNode = sceneNode;
+    PageProxyNode* proxyNode = static_cast<PageProxyNode*>(oldNode);
+    if (!proxyNode) {
+        proxyNode = new PageProxyNode(d);
+        d->m_paintNode = proxyNode;
     }
-    d->updateSize();
-    return sceneNode;
+
+    return proxyNode;
 }
 
 QtWebPageEventHandler* QQuickWebPage::eventHandler() const
@@ -144,23 +188,20 @@
     QSizeF scaledSize = contentsSize * contentsScale;
     q->setSize(scaledSize);
     viewportItem->updateContentsSize(scaledSize);
-    QRectF clipRect = viewportItem->mapRectToScene(viewportItem->boundingRect());
-
-    MutexLocker lock(m_paintNodeMutex);
-    if (!m_paintNode)
-        return;
-    m_paintNode->setClipRect(clipRect);
-    m_paintNode->setContentsScale(contentsScale);
 }
 
-void QQuickWebPagePrivate::willDeleteScenegraphNode()
+void QQuickWebPagePrivate::resetPaintNode()
 {
-    MutexLocker lock(m_paintNodeMutex);
     m_paintNode = 0;
+    DrawingAreaProxy* drawingArea = webPageProxy->drawingArea();
+    if (drawingArea && drawingArea->layerTreeHostProxy())
+        drawingArea->layerTreeHostProxy()->purgeGLResources();
 }
 
 QQuickWebPagePrivate::~QQuickWebPagePrivate()
 {
+    if (m_paintNode)
+        static_cast<PageProxyNode*>(m_paintNode)->m_pagePrivate = 0;
 }
 
 #include "moc_qquickwebpage_p.cpp"

Modified: trunk/Source/WebKit2/UIProcess/API/qt/qquickwebpage_p_p.h (109754 => 109755)


--- trunk/Source/WebKit2/UIProcess/API/qt/qquickwebpage_p_p.h	2012-03-05 16:55:37 UTC (rev 109754)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qquickwebpage_p_p.h	2012-03-05 17:15:48 UTC (rev 109755)
@@ -21,7 +21,6 @@
 #ifndef qquickwebpage_p_p_h
 #define qquickwebpage_p_p_h
 
-#include "QtWebPageSGNode.h"
 #include "qquickwebpage_p.h"
 #include <QTransform>
 
@@ -32,16 +31,17 @@
 
 class QtWebPageEventHandler;
 
-class QQuickWebPagePrivate : public QtWebPageSGNode::Client {
+class QQuickWebPagePrivate {
 public:
     QQuickWebPagePrivate(QQuickWebPage* q, QQuickWebView* viewportItem);
     ~QQuickWebPagePrivate();
-    virtual void willDeleteScenegraphNode();
 
     void initialize(WebKit::WebPageProxy*);
     void setDrawingAreaSize(const QSize&);
 
     void updateSize();
+
+    void paintToCurrentGLContext(const QTransform&, float opacity);
     void paint(QPainter*);
     void resetPaintNode();
 
@@ -50,8 +50,7 @@
     QQuickWebView* const viewportItem;
     WebKit::WebPageProxy* webPageProxy;
     bool paintingIsInitialized;
-    QtWebPageSGNode* m_paintNode;
-    Mutex m_paintNodeMutex;
+    QSGNode* m_paintNode;
 
     QSizeF contentsSize;
     qreal contentsScale;

Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h (109754 => 109755)


--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h	2012-03-05 16:55:37 UTC (rev 109754)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h	2012-03-05 17:15:48 UTC (rev 109755)
@@ -29,7 +29,6 @@
 
 #include "BackingStore.h"
 #include "DrawingAreaInfo.h"
-#include "LayerTreeHostProxy.h"
 #include <WebCore/IntRect.h>
 #include <WebCore/IntSize.h>
 #include <stdint.h>
@@ -55,6 +54,7 @@
 namespace WebKit {
 
 class LayerTreeContext;
+class LayerTreeHostProxy;
 class UpdateInfo;
 class WebLayerTreeInfo;
 class WebLayerUpdateInfo;
@@ -90,7 +90,7 @@
     virtual bool isBackingStoreReady() const { return true; }
     virtual void paintToCurrentGLContext(const WebCore::TransformationMatrix&, float, const WebCore::FloatRect&) { }
     virtual void paintLayerTree(BackingStore::PlatformGraphicsContext) { }
-    PassRefPtr<LayerTreeHostProxy> layerTreeHostProxy() const { return m_layerTreeHostProxy; }
+    LayerTreeHostProxy* layerTreeHostProxy() const { return m_layerTreeHostProxy.get(); }
     virtual void setVisibleContentsRectForScaling(const WebCore::IntRect& visibleContentsRect, float scale) { }
     virtual void setVisibleContentsRectForPanning(const WebCore::IntRect& visibleContentsRect, const WebCore::FloatPoint& trajectoryVector) { }
     virtual void createTileForLayer(int layerID, int tileID, const WebKit::UpdateInfo&) { }
@@ -110,7 +110,7 @@
     WebCore::IntSize m_scrollOffset;
 
 #if USE(UI_SIDE_COMPOSITING)
-    RefPtr<LayerTreeHostProxy> m_layerTreeHostProxy;
+    OwnPtr<LayerTreeHostProxy> m_layerTreeHostProxy;
 #endif
 
 private:

Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp (109754 => 109755)


--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp	2012-03-05 16:55:37 UTC (rev 109754)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp	2012-03-05 17:15:48 UTC (rev 109755)
@@ -61,7 +61,7 @@
 #if USE(UI_SIDE_COMPOSITING)
     // Construct the proxy early to allow messages to be sent to the web process while AC is entered there.
     if (webPageProxy->pageGroup()->preferences()->forceCompositingMode())
-        m_layerTreeHostProxy = LayerTreeHostProxy::create(this);
+        m_layerTreeHostProxy = adoptPtr(new LayerTreeHostProxy(this));
 #endif
 }
 
@@ -337,7 +337,7 @@
     m_webPageProxy->enterAcceleratedCompositingMode(layerTreeContext);
 #if USE(UI_SIDE_COMPOSITING)
     if (!m_layerTreeHostProxy)
-        m_layerTreeHostProxy = LayerTreeHostProxy::create(this);
+        m_layerTreeHostProxy = adoptPtr(new LayerTreeHostProxy(this));
 #endif
 }
 

Modified: trunk/Source/WebKit2/UIProcess/LayerTreeHostProxy.h (109754 => 109755)


--- trunk/Source/WebKit2/UIProcess/LayerTreeHostProxy.h	2012-03-05 16:55:37 UTC (rev 109754)
+++ trunk/Source/WebKit2/UIProcess/LayerTreeHostProxy.h	2012-03-05 17:15:48 UTC (rev 109755)
@@ -23,7 +23,7 @@
 #if USE(UI_SIDE_COMPOSITING)
 
 #include "BackingStore.h"
-#include "Connection.h"
+#include "DrawingAreaProxy.h"
 #include "Region.h"
 #include "TextureMapper.h"
 #include "TextureMapperBackingStore.h"
@@ -36,17 +36,17 @@
 #include <WebCore/Timer.h>
 #include <wtf/Functional.h>
 #include <wtf/HashSet.h>
-#include <wtf/ThreadingPrimitives.h>
 
+
 namespace WebKit {
 
-class DrawingAreaProxy;
 class LayerBackingStore;
 class WebLayerInfo;
 class WebLayerUpdateInfo;
 
-class LayerTreeHostProxy : public ThreadSafeRefCounted<LayerTreeHostProxy>, public WebCore::GraphicsLayerClient {
+class LayerTreeHostProxy : public WebCore::GraphicsLayerClient {
 public:
+    LayerTreeHostProxy(DrawingAreaProxy*);
     virtual ~LayerTreeHostProxy();
     void syncCompositingLayerState(const WebLayerInfo&);
     void deleteCompositingLayer(WebLayerID);
@@ -68,8 +68,6 @@
     void didReceiveLayerTreeHostProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
     void updateViewport();
 
-    static PassRefPtr<LayerTreeHostProxy> create(DrawingAreaProxy* drawingArea) { return adoptRef(new LayerTreeHostProxy(drawingArea)); }
-
 protected:
     PassOwnPtr<WebCore::GraphicsLayer> createLayer(WebLayerID);
 
@@ -90,10 +88,7 @@
     float m_contentsScale;
 
     Vector<Function<void()> > m_renderQueue;
-    WTF::Mutex m_renderQueueMutex;
     void dispatchUpdate(const Function<void()>&);
-    void detachDrawingArea();
-    void setShouldRenderNextFrame();
 
 #if USE(TEXTURE_MAPPER)
     OwnPtr<WebCore::TextureMapper> m_textureMapper;
@@ -118,14 +113,13 @@
     void ensureLayer(WebLayerID);
     void swapBuffers();
     void syncAnimations();
-    void updateViewportOnMainThread();
-    LayerTreeHostProxy(DrawingAreaProxy*);
 
     OwnPtr<WebCore::GraphicsLayer> m_rootLayer;
     Vector<WebLayerID> m_layersToDelete;
 
     LayerMap m_layers;
     WebLayerID m_rootLayerID;
+    int m_id;
 };
 
 }

Modified: trunk/Source/WebKit2/UIProcess/qt/LayerTreeHostProxyQt.cpp (109754 => 109755)


--- trunk/Source/WebKit2/UIProcess/qt/LayerTreeHostProxyQt.cpp	2012-03-05 16:55:37 UTC (rev 109754)
+++ trunk/Source/WebKit2/UIProcess/qt/LayerTreeHostProxyQt.cpp	2012-03-05 17:15:48 UTC (rev 109755)
@@ -95,32 +95,6 @@
     syncAnimations();
 }
 
-template<class T>
-class MainThreadGuardedInvoker {
-public:
-    static void call(PassRefPtr<T> objectToGuard, const Function<void()>& function)
-    {
-        MainThreadGuardedInvoker<T>* invoker = new MainThreadGuardedInvoker<T>(objectToGuard, function);
-        callOnMainThread(invoke, invoker);
-    }
-
-private:
-    MainThreadGuardedInvoker(PassRefPtr<T> object, const Function<void()>& newFunction)
-        : objectToGuard(object)
-        , function(newFunction)
-    {
-    }
-
-    RefPtr<T> objectToGuard;
-    Function<void()> function;
-    static void invoke(void* data)
-    {
-        MainThreadGuardedInvoker<T>* invoker = static_cast<MainThreadGuardedInvoker<T>*>(data);
-        invoker->function();
-        delete invoker;
-    }
-};
-
 void LayerTreeHostProxy::syncAnimations()
 {
     TextureMapperLayer* layer = toTextureMapperLayer(rootLayer());
@@ -128,7 +102,7 @@
 
     layer->syncAnimationsRecursively();
     if (layer->descendantsOrSelfHaveRunningAnimations())
-        MainThreadGuardedInvoker<LayerTreeHostProxy>::call(this, bind(&LayerTreeHostProxy::updateViewport, this));
+        updateViewport();
 }
 
 void LayerTreeHostProxy::paintToGraphicsContext(QPainter* painter)
@@ -153,15 +127,9 @@
 
 void LayerTreeHostProxy::updateViewport()
 {
-    if (m_drawingAreaProxy)
-        m_drawingAreaProxy->updateViewport();
+    m_drawingAreaProxy->updateViewport();
 }
 
-void LayerTreeHostProxy::detachDrawingArea()
-{
-    m_drawingAreaProxy = 0;
-}
-
 void LayerTreeHostProxy::syncLayerParameters(const WebLayerInfo& layerInfo)
 {
     WebLayerID id = layerInfo.id;
@@ -217,14 +185,11 @@
         case WebKit::WebLayerAnimation::RemoveAnimation:
             layer->removeAnimation(anim.name);
             break;
-        case WebKit::WebLayerAnimation::PauseAnimation: {
+        case WebKit::WebLayerAnimation::PauseAnimation:
             double offset = WTF::currentTime() - anim.startTime;
             layer->pauseAnimation(anim.name, offset);
             break;
         }
-        default:
-            break;
-        }
     }
 
     if (layerInfo.isRootLayer && m_rootLayerID != id)
@@ -330,17 +295,13 @@
     m_backingStoresWithPendingBuffers.clear();
 }
 
-void LayerTreeHostProxy::setShouldRenderNextFrame()
-{
-    // The pending tiles state is on its way to the screen, tell the web process to render the next one.
-    m_drawingAreaProxy->page()->process()->send(Messages::LayerTreeHost::RenderNextFrame(), m_drawingAreaProxy->page()->pageID());
-}
-
 void LayerTreeHostProxy::flushLayerChanges()
 {
     m_rootLayer->syncCompositingState(FloatRect());
     swapBuffers();
-    MainThreadGuardedInvoker<LayerTreeHostProxy>::call(this, bind(&LayerTreeHostProxy::setShouldRenderNextFrame, this));
+
+    // The pending tiles state is on its way for the screen, tell the web process to render the next one.
+    m_drawingAreaProxy->page()->process()->send(Messages::LayerTreeHost::RenderNextFrame(), m_drawingAreaProxy->page()->pageID());
 }
 
 void LayerTreeHostProxy::ensureRootLayer()
@@ -354,13 +315,14 @@
 
     // The root layer should not have zero size, or it would be optimized out.
     m_rootLayer->setSize(FloatSize(1.0, 1.0));
+    if (!m_textureMapper)
+        m_textureMapper = TextureMapper::create(TextureMapper::OpenGLMode);
     toTextureMapperLayer(m_rootLayer.get())->setTextureMapper(m_textureMapper.get());
 }
 
 void LayerTreeHostProxy::syncRemoteContent()
 {
     // We enqueue messages and execute them during paint, as they require an active GL context.
-    MutexLocker locker(m_renderQueueMutex);
     ensureRootLayer();
 
     for (size_t i = 0; i < m_renderQueue.size(); ++i)
@@ -371,7 +333,6 @@
 
 void LayerTreeHostProxy::dispatchUpdate(const Function<void()>& function)
 {
-    MutexLocker locker(m_renderQueueMutex);
     m_renderQueue.append(function);
     updateViewport();
 }
@@ -396,6 +357,7 @@
     dispatchUpdate(bind(&LayerTreeHostProxy::removeTile, this, layerID, tileID));
 }
 
+
 void LayerTreeHostProxy::deleteCompositingLayer(WebLayerID id)
 {
     dispatchUpdate(bind(&LayerTreeHostProxy::deleteLayer, this, id));
@@ -418,7 +380,6 @@
 
 void LayerTreeHostProxy::createDirectlyCompositedImage(int64_t key, const WebKit::ShareableBitmap::Handle& handle)
 {
-    // Even though ShareableBitmap is not ThreadSafeRefCounted, we can safely move it to the renderer thread as the main thread will not touch it anymore.
     RefPtr<ShareableBitmap> bitmap = ShareableBitmap::create(handle);
     dispatchUpdate(bind(&LayerTreeHostProxy::createImage, this, key, bitmap));
 }
@@ -442,8 +403,6 @@
 
 void LayerTreeHostProxy::purgeGLResources()
 {
-    MutexLocker locker(m_renderQueueMutex);
-    m_renderQueue.clear();
     TextureMapperLayer* layer = toTextureMapperLayer(rootLayer());
 
     if (layer)

Deleted: trunk/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.cpp (109754 => 109755)


--- trunk/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.cpp	2012-03-05 16:55:37 UTC (rev 109754)
+++ trunk/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.cpp	2012-03-05 17:15:48 UTC (rev 109755)
@@ -1,78 +0,0 @@
-/*
- * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#include "config.h"
-#include "QtWebPageSGNode.h"
-
-namespace WebKit {
-
-QtWebPageSGNode::QtWebPageSGNode(PassRefPtr<LayerTreeHostProxy> layerTreeHost, Client* client)
-    : m_layerTreeHost(layerTreeHost)
-    , m_client(client)
-    , m_contentsScale(1)
-{
-}
-
-QSGRenderNode::StateFlags QtWebPageSGNode::changedStates()
-{
-    return StateFlags(StencilState) | ColorState | BlendState;
-}
-
-void QtWebPageSGNode::render(const RenderState& state)
-{
-    QTransform transform = matrix() ? matrix()->toTransform() : QTransform();
-    float scale = contentsScale();
-    m_layerTreeHost->paintToCurrentGLContext(QTransform(transform).scale(scale, scale), inheritedOpacity(), clipRect());
-}
-
-void QtWebPageSGNode::setContentsScale(float scale)
-{
-    MutexLocker lock(m_mutex);
-    m_contentsScale = scale;
-}
-
-float QtWebPageSGNode::contentsScale()
-{
-    MutexLocker lock(m_mutex);
-    return m_contentsScale;
-}
-
-void QtWebPageSGNode::setClipRect(const QRectF& rect)
-{
-    MutexLocker lock(m_mutex);
-    m_clipRect = rect;
-}
-
-QRectF QtWebPageSGNode::clipRect()
-{
-    MutexLocker lock(m_mutex);
-    return m_clipRect;
-}
-
-QtWebPageSGNode::~QtWebPageSGNode()
-{
-    if (m_layerTreeHost)
-        m_layerTreeHost->purgeGLResources();
-
-    if (m_client)
-        m_client->willDeleteScenegraphNode();
-}
-
-}

Deleted: trunk/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.h (109754 => 109755)


--- trunk/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.h	2012-03-05 16:55:37 UTC (rev 109754)
+++ trunk/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.h	2012-03-05 17:15:48 UTC (rev 109755)
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef QtWebPageSGNode_h
-#define QtWebPageSGNode_h
-
-#include "LayerTreeHostProxy.h"
-#include <private/qsgrendernode_p.h>
-
-namespace WebKit {
-
-struct QtWebPageSGNode : public QSGRenderNode {
-public:
-    struct Client {
-        virtual void willDeleteScenegraphNode() { }
-    };
-
-    QtWebPageSGNode(PassRefPtr<LayerTreeHostProxy>, Client*);
-    ~QtWebPageSGNode();
-    virtual StateFlags changedStates();
-    virtual void render(const RenderState&);
-    void setContentsScale(float);
-    float contentsScale();
-    void setClipRect(const QRectF&);
-    QRectF clipRect();
-
-private:
-    RefPtr<LayerTreeHostProxy> m_layerTreeHost;
-    Client* m_client;
-    float m_contentsScale;
-    QRectF m_clipRect;
-    Mutex m_mutex;
-};
-
-}
-#endif /* QtWebPageSGNode_h */

Modified: trunk/Tools/ChangeLog (109754 => 109755)


--- trunk/Tools/ChangeLog	2012-03-05 16:55:37 UTC (rev 109754)
+++ trunk/Tools/ChangeLog	2012-03-05 17:15:48 UTC (rev 109755)
@@ -1,3 +1,15 @@
+2012-03-05  Sheriff Bot  <webkit.review....@gmail.com>
+
+        Unreviewed, rolling out r109748.
+        http://trac.webkit.org/changeset/109748
+        https://bugs.webkit.org/show_bug.cgi?id=80296
+
+        Made some tests crash, will fix and recommit (Requested by
+        noamr on #webkit).
+
+        * MiniBrowser/qt/main.cpp:
+        (main):
+
 2012-03-05  Zan Dobersek  <zandober...@gmail.com>
 
         [GTK] plugins/netscape-plugin-page-cache-works.html fails

Modified: trunk/Tools/MiniBrowser/qt/main.cpp (109754 => 109755)


--- trunk/Tools/MiniBrowser/qt/main.cpp	2012-03-05 16:55:37 UTC (rev 109754)
+++ trunk/Tools/MiniBrowser/qt/main.cpp	2012-03-05 17:15:48 UTC (rev 109755)
@@ -39,6 +39,9 @@
 
 int main(int argc, char** argv)
 {
+    // FIXME: We must add support for the threaded rendering as it is the default.
+    qputenv("QML_NO_THREADED_RENDERER", QByteArray("1"));
+
     MiniBrowserApplication app(argc, argv);
 
     if (app.isRobotized()) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to