2011-06-24 Nat Duca <nduca@chromium.org>
authornduca@chromium.org <nduca@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Jun 2011 20:46:42 +0000 (20:46 +0000)
committernduca@chromium.org <nduca@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Jun 2011 20:46:42 +0000 (20:46 +0000)
        Unreviewed, rolling out r89694.
        http://trac.webkit.org/changeset/89694
        https://bugs.webkit.org/show_bug.cgi?id=58408

        Test shell still not ready for animate changes.

        * WebCore.gypi:
        * platform/graphics/chromium/LayerRendererChromium.cpp:
        (WebCore::LayerRendererChromium::create):
        (WebCore::LayerRendererChromium::LayerRendererChromium):
        (WebCore::LayerRendererChromium::setViewport):
        (WebCore::LayerRendererChromium::updateAndDrawLayers):
        * platform/graphics/chromium/LayerRendererChromium.h:
        * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
        * platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
        (WebCore::CCHeadsUpDisplay::setShowFPSCounter):
        (WebCore::CCHeadsUpDisplay::setShowPlatformLayerTree):
        * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: Removed.
        * platform/graphics/chromium/cc/CCLayerTreeHost.h: Removed.
        * platform/graphics/chromium/cc/CCLayerTreeHostCommitter.cpp: Removed.
        * platform/graphics/chromium/cc/CCLayerTreeHostCommitter.h: Removed.
        * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: Removed.
        * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: Removed.
        * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp: Removed.
        * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h: Removed.
        * platform/graphics/chromium/cc/CCMainThreadTask.h:
        * platform/graphics/chromium/cc/CCThread.cpp:
        (WebCore::CCThread::runLoop):
        * platform/graphics/chromium/cc/CCThreadTask.h:
2011-06-24  Nat Duca  <nduca@chromium.org>

        Unreviewed, rolling out r89694.
        http://trac.webkit.org/changeset/89694
        https://bugs.webkit.org/show_bug.cgi?id=58408

        Test shell still not ready for animate changes.

        * WebKit.gypi:
        * public/WebWidget.h:
        (WebKit::WebWidget::animate):
        (WebKit::WebWidget::composite):
        * src/WebPopupMenuImpl.cpp:
        (WebKit::WebPopupMenuImpl::animate):
        * src/WebPopupMenuImpl.h:
        * src/WebViewImpl.cpp:
        (WebKit::WebViewImpl::resize):
        (WebKit::WebViewImpl::animate):
        (WebKit::WebViewImpl::paint):
        (WebKit::WebViewImpl::composite):
        (WebKit::WebViewImpl::fullFramePluginZoomLevelChanged):
        (WebKit::WebView::zoomLevelToZoomFactor):
        (WebKit::WebViewImpl::setRootLayerNeedsDisplay):
        (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
        (WebKit::WebViewImpl::doComposite):
        (WebKit::WebViewImpl::reallocateRenderer):
        (WebKit::WebViewImpl::updateLayerRendererViewport):
        (WebKit::WebViewImpl::graphicsContext3D):
        * src/WebViewImpl.h:
        * tests/CCLayerTreeHostTest.cpp: Removed.
        * tests/CCThreadTest.cpp:
        (WebCore::TEST):
2011-06-24  Nat Duca  <nduca@chromium.org>

        Unreviewed, rolling out r89694.
        http://trac.webkit.org/changeset/89694
        https://bugs.webkit.org/show_bug.cgi?id=58408

        Test shell still not ready for animate changes.

        * DumpRenderTree/chromium/WebViewHost.cpp:
        (WebViewHost::paintInvalidatedRegion):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@89700 268f45cc-cd09-0410-ab3c-d52691b4dbfc

28 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.gypi
Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h
Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp
Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.h
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp [deleted file]
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h [deleted file]
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommitter.cpp [deleted file]
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommitter.h [deleted file]
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp [deleted file]
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h [deleted file]
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp [deleted file]
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h [deleted file]
Source/WebCore/platform/graphics/chromium/cc/CCMainThreadTask.h
Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp
Source/WebCore/platform/graphics/chromium/cc/CCThreadTask.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gypi
Source/WebKit/chromium/public/WebWidget.h
Source/WebKit/chromium/src/WebPopupMenuImpl.cpp
Source/WebKit/chromium/src/WebPopupMenuImpl.h
Source/WebKit/chromium/src/WebViewImpl.cpp
Source/WebKit/chromium/src/WebViewImpl.h
Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp [deleted file]
Source/WebKit/chromium/tests/CCThreadTest.cpp
Tools/ChangeLog
Tools/DumpRenderTree/chromium/WebViewHost.cpp

index 77db338..b0ce6ec 100644 (file)
@@ -1,3 +1,35 @@
+2011-06-24  Nat Duca  <nduca@chromium.org>
+
+        Unreviewed, rolling out r89694.
+        http://trac.webkit.org/changeset/89694
+        https://bugs.webkit.org/show_bug.cgi?id=58408
+
+        Test shell still not ready for animate changes.
+
+        * WebCore.gypi:
+        * platform/graphics/chromium/LayerRendererChromium.cpp:
+        (WebCore::LayerRendererChromium::create):
+        (WebCore::LayerRendererChromium::LayerRendererChromium):
+        (WebCore::LayerRendererChromium::setViewport):
+        (WebCore::LayerRendererChromium::updateAndDrawLayers):
+        * platform/graphics/chromium/LayerRendererChromium.h:
+        * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
+        * platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
+        (WebCore::CCHeadsUpDisplay::setShowFPSCounter):
+        (WebCore::CCHeadsUpDisplay::setShowPlatformLayerTree):
+        * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: Removed.
+        * platform/graphics/chromium/cc/CCLayerTreeHost.h: Removed.
+        * platform/graphics/chromium/cc/CCLayerTreeHostCommitter.cpp: Removed.
+        * platform/graphics/chromium/cc/CCLayerTreeHostCommitter.h: Removed.
+        * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: Removed.
+        * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: Removed.
+        * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp: Removed.
+        * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h: Removed.
+        * platform/graphics/chromium/cc/CCMainThreadTask.h:
+        * platform/graphics/chromium/cc/CCThread.cpp:
+        (WebCore::CCThread::runLoop):
+        * platform/graphics/chromium/cc/CCThreadTask.h:
+
 2011-06-24  Chris Rogers  <crogers@google.com>
 
         Unreviewed build fix.
index 7f8def1..8f99bac 100644 (file)
             'platform/graphics/chromium/cc/CCLayerImpl.h',
             'platform/graphics/chromium/cc/CCLayerSorter.cpp',
             'platform/graphics/chromium/cc/CCLayerSorter.h',
-            'platform/graphics/chromium/cc/CCLayerTreeHost.cpp',
-            'platform/graphics/chromium/cc/CCLayerTreeHost.h',
-            'platform/graphics/chromium/cc/CCLayerTreeHostCommitter.cpp',
-            'platform/graphics/chromium/cc/CCLayerTreeHostCommitter.h',
-            'platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp',
-            'platform/graphics/chromium/cc/CCLayerTreeHostImpl.h',
-            'platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp',
-            'platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h',
             'platform/graphics/chromium/cc/CCMainThread.cpp',
             'platform/graphics/chromium/cc/CCMainThread.h',
             'platform/graphics/chromium/cc/CCMainThreadTask.h',
index fd3de6b..9656ad3 100644 (file)
@@ -50,8 +50,6 @@
 #include "TraceEvent.h"
 #include "WebGLLayerChromium.h"
 #include "cc/CCLayerImpl.h"
-#include "cc/CCLayerTreeHostImpl.h"
-#include "cc/CCMainThreadTask.h"
 #if USE(SKIA)
 #include "Extensions3D.h"
 #include "GrContext.h"
@@ -100,26 +98,22 @@ static bool isScaleOrTranslation(const TransformationMatrix& m)
 
 }
 
-PassRefPtr<LayerRendererChromium> LayerRendererChromium::create(CCLayerTreeHostClient* client, PassOwnPtr<LayerPainterChromium> contentPaint, bool accelerateDrawing)
+PassRefPtr<LayerRendererChromium> LayerRendererChromium::create(PassRefPtr<GraphicsContext3D> context, PassOwnPtr<LayerPainterChromium> contentPaint, bool accelerateDrawing)
 {
-    RefPtr<GraphicsContext3D> context = client->createLayerTreeHostContext3D();
     if (!context)
         return 0;
 
-    RefPtr<LayerRendererChromium> layerRenderer(adoptRef(new LayerRendererChromium(client, context, contentPaint, accelerateDrawing)));
-    layerRenderer->init();
+    RefPtr<LayerRendererChromium> layerRenderer(adoptRef(new LayerRendererChromium(context, contentPaint, accelerateDrawing)));
     if (!layerRenderer->hardwareCompositing())
         return 0;
 
     return layerRenderer.release();
 }
 
-LayerRendererChromium::LayerRendererChromium(CCLayerTreeHostClient* client,
-                                             PassRefPtr<GraphicsContext3D> context,
+LayerRendererChromium::LayerRendererChromium(PassRefPtr<GraphicsContext3D> context,
                                              PassOwnPtr<LayerPainterChromium> contentPaint,
                                              bool accelerateDrawing)
-    : CCLayerTreeHost(client)
-    , m_viewportScrollPosition(IntPoint(-1, -1))
+    : m_viewportScrollPosition(IntPoint(-1, -1))
     , m_rootLayer(0)
     , m_accelerateDrawing(false)
     , m_currentRenderSurface(0)
@@ -229,12 +223,10 @@ void LayerRendererChromium::setViewport(const IntRect& visibleRect, const IntRec
         m_currentRenderSurface = 0;
         m_rootLayerContentTiler->invalidateEntireLayer();
     }
-    setNeedsCommitAndRedraw();
 }
 
-void LayerRendererChromium::updateLayers()
+void LayerRendererChromium::updateAndDrawLayers()
 {
-    CCLayerTreeHost::updateLayers();
     if (m_viewportVisibleRect.isEmpty())
         return;
 
@@ -259,14 +251,9 @@ void LayerRendererChromium::updateLayers()
         m_rootCCLayerImpl = TreeSynchronizer::synchronizeTrees(m_rootLayer.get(), m_rootCCLayerImpl.get());
     }
 
-    m_computedRenderSurfaceLayerList = adoptPtr(new LayerList());
-    updateLayers(*m_computedRenderSurfaceLayerList);
-}
+    LayerList renderSurfaceLayerList;
+    updateLayers(renderSurfaceLayerList);
 
-void LayerRendererChromium::drawLayers()
-{
-    ASSERT(m_hardwareCompositing);
-    ASSERT(m_computedRenderSurfaceLayerList);
     // Before drawLayers:
     if (hardwareCompositing() && m_contextSupportsLatch) {
         // FIXME: The multithreaded compositor case will not work as long as
@@ -289,7 +276,7 @@ void LayerRendererChromium::drawLayers()
         }
     }
 
-    drawLayers(*m_computedRenderSurfaceLayerList);
+    drawLayers(renderSurfaceLayerList);
 
     m_textureManager->unprotectAllTextures();
 
@@ -1278,74 +1265,6 @@ void LayerRendererChromium::dumpRenderSurfaces(TextStream& ts, int indent, Layer
         dumpRenderSurfaces(ts, indent, layer->children()[i].get());
 }
 
-class LayerRendererChromiumImpl : public CCLayerTreeHostImpl {
-public:
-    static PassOwnPtr<LayerRendererChromiumImpl> create(CCLayerTreeHostImplClient* client, LayerRendererChromium* layerRenderer)
-    {
-        return adoptPtr(new LayerRendererChromiumImpl(client, layerRenderer));
-    }
-
-    virtual void drawLayersAndPresent()
-    {
-        CCCompletionEvent completion;
-        bool contextLost;
-        CCMainThread::postTask(createMainThreadTask(this, &LayerRendererChromiumImpl::drawLayersOnMainThread, AllowCrossThreadAccess(&completion), AllowCrossThreadAccess(&contextLost)));
-        completion.wait();
-
-        // FIXME: Send the "UpdateRect" message up to the RenderWidget [or moveplugin equivalents...]
-
-        // FIXME: handle context lost
-        if (contextLost)
-            FATAL("LayerRendererChromiumImpl does not handle context lost yet.");
-    }
-
-private:
-    LayerRendererChromiumImpl(CCLayerTreeHostImplClient* client, LayerRendererChromium* layerRenderer)
-        : CCLayerTreeHostImpl(client)
-        , m_layerRenderer(layerRenderer) { }
-
-    void drawLayersOnMainThread(CCCompletionEvent* completion, bool* contextLost)
-    {
-        ASSERT(isMainThread());
-
-        if (m_layerRenderer->rootLayer()) {
-            m_layerRenderer->drawLayers();
-            m_layerRenderer->present();
-
-            GraphicsContext3D* context = m_layerRenderer->context();
-            *contextLost = context->getExtensions()->getGraphicsResetStatusARB() != GraphicsContext3D::NO_ERROR;
-        } else
-            *contextLost = false;
-        completion->signal();
-    }
-
-    LayerRendererChromium* m_layerRenderer;
-};
-
-class LayerRendererChromiumImplProxy : public CCLayerTreeHostImplProxy {
-public:
-    static PassOwnPtr<LayerRendererChromiumImplProxy> create(LayerRendererChromium* layerRenderer)
-    {
-        return adoptPtr(new LayerRendererChromiumImplProxy(layerRenderer));
-    }
-
-    virtual PassOwnPtr<CCLayerTreeHostImpl> createLayerTreeHostImpl()
-    {
-        return LayerRendererChromiumImpl::create(this, static_cast<LayerRendererChromium*>(host()));
-    }
-
-private:
-    LayerRendererChromiumImplProxy(LayerRendererChromium* layerRenderer)
-        : CCLayerTreeHostImplProxy(layerRenderer) { }
-};
-
-PassOwnPtr<CCLayerTreeHostImplProxy> LayerRendererChromium::createLayerTreeHostImplProxy()
-{
-    OwnPtr<CCLayerTreeHostImplProxy> proxy = LayerRendererChromiumImplProxy::create(this);
-    proxy->start();
-    return proxy.release();
-}
-
 } // namespace WebCore
 
 #endif // USE(ACCELERATED_COMPOSITING)
index c9485c8..f5f2f3c 100644 (file)
 #include "cc/CCCanvasLayerImpl.h"
 #include "cc/CCHeadsUpDisplay.h"
 #include "cc/CCLayerSorter.h"
-#include "cc/CCLayerTreeHost.h"
 #include "cc/CCPluginLayerImpl.h"
 #include "cc/CCVideoLayerImpl.h"
 #include <wtf/HashMap.h>
 #include <wtf/Noncopyable.h>
 #include <wtf/PassOwnPtr.h>
 #include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
 #include <wtf/Vector.h>
 
 #if USE(CG)
@@ -66,16 +66,14 @@ namespace WebCore {
 
 class CCHeadsUpDisplay;
 class CCLayerImpl;
-class CCLayerTreeHostCommitter;
-class CCLayerTreeHostImpl;
 class GeometryBinding;
 class GraphicsContext3D;
 class LayerPainterChromium;
 
 // Class that handles drawing of composited render layers using GL.
-class LayerRendererChromium : public CCLayerTreeHost {
+class LayerRendererChromium : public RefCounted<LayerRendererChromium> {
 public:
-    static PassRefPtr<LayerRendererChromium> create(CCLayerTreeHostClient*, PassOwnPtr<LayerPainterChromium> contentPaint, bool accelerateDrawing);
+    static PassRefPtr<LayerRendererChromium> create(PassRefPtr<GraphicsContext3D>, PassOwnPtr<LayerPainterChromium> contentPaint, bool accelerateDrawing);
 
     ~LayerRendererChromium();
 
@@ -90,8 +88,7 @@ public:
     void setViewport(const IntRect& visibleRect, const IntRect& contentRect, const IntPoint& scrollPosition);
 
     // updates and draws the current layers onto the backbuffer
-    virtual void updateLayers();
-    void drawLayers();
+    void updateAndDrawLayers();
 
     // Set by WebViewImpl when animation callbacks are running.
     // FIXME: When we move scheduling into the compositor, we can remove this flag.
@@ -159,17 +156,14 @@ public:
 #ifndef NDEBUG
     static bool s_inPaintLayerContents;
 #endif
-protected:
-    virtual PassOwnPtr<CCLayerTreeHostImplProxy> createLayerTreeHostImplProxy();
-
 private:
     typedef Vector<RefPtr<CCLayerImpl> > LayerList;
     typedef HashMap<GraphicsContext3D*, int> ChildContextMap;
 
-    // FIXME: This needs to be moved to the CCLayerTreeHostImpl when that class exists.
+    // FIXME: This needs to be moved to the CCViewImpl when that class exists.
     RefPtr<CCLayerImpl> m_rootCCLayerImpl;
 
-    LayerRendererChromium(CCLayerTreeHostClient*, PassRefPtr<GraphicsContext3D>, PassOwnPtr<LayerPainterChromium> contentPaint, bool accelerateDrawing);
+    LayerRendererChromium(PassRefPtr<GraphicsContext3D>, PassOwnPtr<LayerPainterChromium> contentPaint, bool accelerateDrawing);
 
     void updateLayers(LayerList& renderSurfaceLayerList);
     void updateRootLayerContents();
@@ -216,8 +210,6 @@ private:
     bool m_hardwareCompositing;
     bool m_accelerateDrawing;
 
-    OwnPtr<LayerList> m_computedRenderSurfaceLayerList;
-
     RenderSurfaceChromium* m_currentRenderSurface;
     unsigned m_offscreenFramebufferId;
     bool m_compositeOffscreen;
index 295d310..f2a72a1 100644 (file)
@@ -247,18 +247,6 @@ void CCHeadsUpDisplay::onPresent()
     m_currentFrameNumber += 1;
 }
 
-void CCHeadsUpDisplay::setShowFPSCounter(bool show)
-{
-    m_showFPSCounter = show;
-    m_layerRenderer->setNeedsRedraw();
-}
-
-void CCHeadsUpDisplay::setShowPlatformLayerTree(bool show)
-{
-    m_showPlatformLayerTree = show;
-    m_layerRenderer->setNeedsRedraw();
-}
-
 }
 
 #endif // USE(ACCELERATED_COMPOSITING)
index f043317..9057534 100644 (file)
@@ -49,15 +49,13 @@ public:
 
     ~CCHeadsUpDisplay();
 
-    int currentFrameNumber() const { return m_currentFrameNumber; }
-
     void onFrameBegin(double timestamp);
     void onPresent();
 
-    void setShowFPSCounter(bool enable);
+    void setShowFPSCounter(bool enable) { m_showFPSCounter = enable; }
     bool showFPSCounter() const { return m_showFPSCounter; }
 
-    void setShowPlatformLayerTree(bool enable);
+    void setShowPlatformLayerTree(bool enable) { m_showPlatformLayerTree = enable; }
     bool showPlatformLayerTree() const { return m_showPlatformLayerTree; }
 
     bool enabled() const { return m_showPlatformLayerTree || m_showFPSCounter; }
diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp b/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp
deleted file mode 100644 (file)
index 518a91e..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "cc/CCLayerTreeHost.h"
-
-#include "TraceEvent.h"
-#include "cc/CCLayerTreeHostCommitter.h"
-#include "cc/CCLayerTreeHostImpl.h"
-
-
-namespace WebCore {
-
-CCLayerTreeHost::CCLayerTreeHost(CCLayerTreeHostClient* client)
-    : m_client(client)
-    , m_frameNumber(0)
-{
-}
-
-void CCLayerTreeHost::init()
-{
-#if USE(THREADED_COMPOSITING)
-    m_proxy = createLayerTreeHostImplProxy();
-    ASSERT(m_proxy->isStarted());
-    m_proxy->setNeedsCommitAndRedraw();
-#endif
-}
-
-CCLayerTreeHost::~CCLayerTreeHost()
-{
-    TRACE_EVENT("CCLayerTreeHost::~CCLayerTreeHost", this, 0);
-#if USE(THREADED_COMPOSITING)
-    m_proxy->stop();
-    m_proxy.clear();
-#endif
-}
-
-void CCLayerTreeHost::beginCommit()
-{
-}
-
-void CCLayerTreeHost::commitComplete()
-{
-    m_frameNumber++;
-}
-
-void CCLayerTreeHost::animateAndLayout(double frameBeginTime)
-{
-    m_client->animateAndLayout(frameBeginTime);
-}
-
-PassOwnPtr<CCLayerTreeHostCommitter> CCLayerTreeHost::createLayerTreeHostCommitter()
-{
-    return CCLayerTreeHostCommitter::create();
-}
-
-void CCLayerTreeHost::setNeedsCommitAndRedraw()
-{
-#if USE(THREADED_COMPOSITING)
-    m_proxy->setNeedsCommitAndRedraw();
-#endif
-}
-
-void CCLayerTreeHost::setNeedsRedraw()
-{
-    TRACE_EVENT("CCLayerTreeHost::setNeedsRedraw", this, 0);
-#if USE(THREADED_COMPOSITING)
-    m_proxy->setNeedsRedraw();
-#endif
-}
-
-void CCLayerTreeHost::updateLayers()
-{
-    m_client->updateLayers();
-}
-
-}
diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h b/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h
deleted file mode 100644 (file)
index 668e8bf..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef CCLayerTreeHost_h
-#define CCLayerTreeHost_h
-
-#include "cc/CCLayerTreeHostCommitter.h"
-#include "cc/CCLayerTreeHostImplProxy.h"
-#include <wtf/PassOwnPtr.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-
-namespace WebCore {
-
-class CCLayerTreeHostImpl;
-class CCLayerTreeHostImplClient;
-class GraphicsContext3D;
-
-class CCLayerTreeHostClient {
-public:
-    virtual void animateAndLayout(double frameBeginTime) = 0;
-    virtual PassRefPtr<GraphicsContext3D> createLayerTreeHostContext3D() = 0;
-    virtual void updateLayers() = 0;
-
-protected:
-    virtual ~CCLayerTreeHostClient() { }
-};
-
-class CCLayerTreeHost : public RefCounted<CCLayerTreeHost> {
-public:
-    explicit CCLayerTreeHost(CCLayerTreeHostClient*);
-    void init();
-    virtual ~CCLayerTreeHost();
-
-    virtual void animateAndLayout(double frameBeginTime);
-    virtual void beginCommit();
-    virtual void commitComplete();
-    virtual PassOwnPtr<CCLayerTreeHostCommitter> createLayerTreeHostCommitter();
-
-    int frameNumber() const { return m_frameNumber; }
-
-    void setNeedsCommitAndRedraw();
-    void setNeedsRedraw();
-
-    virtual void updateLayers();
-
-protected:
-    virtual PassOwnPtr<CCLayerTreeHostImplProxy> createLayerTreeHostImplProxy() = 0;
-
-private:
-    CCLayerTreeHostClient* m_client;
-    int m_frameNumber;
-    OwnPtr<CCLayerTreeHostImplProxy> m_proxy;
-};
-
-}
-
-#endif
diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommitter.cpp b/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommitter.cpp
deleted file mode 100644 (file)
index 72dd714..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "cc/CCLayerTreeHostCommitter.h"
-
-#include "cc/CCLayerTreeHost.h"
-#include "cc/CCLayerTreeHostImpl.h"
-
-namespace WebCore {
-
-PassOwnPtr<CCLayerTreeHostCommitter> CCLayerTreeHostCommitter::create()
-{
-    return adoptPtr(new CCLayerTreeHostCommitter());
-}
-
-void CCLayerTreeHostCommitter::commit(CCLayerTreeHost* host, CCLayerTreeHostImpl* hostImpl)
-{
-    hostImpl->setSourceFrameNumber(host->frameNumber());
-}
-
-}
diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommitter.h b/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommitter.h
deleted file mode 100644 (file)
index dd8e918..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef CCLayerTreeHostCommitter_h
-#define CCLayerTreeHostCommitter_h
-
-#include <wtf/Noncopyable.h>
-#include <wtf/PassOwnPtr.h>
-
-namespace WebCore {
-
-class CCLayerTreeHost;
-class CCLayerTreeHostImpl;
-
-// FIXME: merge in TreeSynchronizer code into here
-class CCLayerTreeHostCommitter {
-    WTF_MAKE_NONCOPYABLE(CCLayerTreeHostCommitter);
-public:
-    static PassOwnPtr<CCLayerTreeHostCommitter> create();
-    virtual void commit(CCLayerTreeHost*, CCLayerTreeHostImpl*);
-
-protected:
-    CCLayerTreeHostCommitter() { }
-};
-
-}
-
-#endif
diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp b/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp
deleted file mode 100644 (file)
index a3aa2ba..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "cc/CCLayerTreeHostImpl.h"
-
-#include "TraceEvent.h"
-#include "cc/CCLayerTreeHost.h"
-#include "cc/CCThreadTask.h"
-#include <wtf/CurrentTime.h>
-
-namespace WebCore {
-
-CCLayerTreeHostImpl::CCLayerTreeHostImpl(CCLayerTreeHostImplClient* client)
-    : m_sourceFrameNumber(-1)
-    , m_frameNumber(0)
-    , m_client(client)
-    , m_commitPending(false)
-    , m_redrawPending(false)
-{
-}
-
-CCLayerTreeHostImpl::~CCLayerTreeHostImpl()
-{
-    TRACE_EVENT("CCLayerTreeHostImpl::~CCLayerTreeHostImpl()", this, 0);
-}
-
-void CCLayerTreeHostImpl::beginCommit()
-{
-}
-
-void CCLayerTreeHostImpl::commitComplete()
-{
-    m_commitPending = false;
-    setNeedsRedraw();
-}
-
-void CCLayerTreeHostImpl::drawLayers()
-{
-    // If a commit is pending, do not draw. This is a temporary restriction that
-    // is necessary because drawLayers is currently a blocking operation on the main thread.
-    if (m_commitPending)
-        return;
-
-    TRACE_EVENT("CCLayerTreeHostImpl::drawLayers", this, 0);
-    ASSERT(m_redrawPending);
-    m_redrawPending = false;
-
-    {
-        TRACE_EVENT("CCLayerTreeHostImpl::drawLayersAndPresent", this, 0);
-        drawLayersAndPresent();
-    }
-
-    ++m_frameNumber;
-}
-
-void CCLayerTreeHostImpl::setNeedsCommitAndRedraw()
-{
-    TRACE_EVENT("CCLayerTreeHostImpl::setNeedsCommitAndRedraw", this, 0);
-
-    // FIXME: move the requestFrameAndCommit out from here once we add framerate throttling/animation
-    double frameBeginTime = currentTime();
-    m_commitPending = true;
-    m_client->requestFrameAndCommitOnCCThread(frameBeginTime);
-}
-
-void CCLayerTreeHostImpl::setNeedsRedraw()
-{
-    if (m_redrawPending || m_commitPending)
-        return;
-
-    TRACE_EVENT("CCLayerTreeHostImpl::setNeedsRedraw", this, 0);
-    m_redrawPending = true;
-    m_client->postDrawLayersTaskOnCCThread();
-}
-
-}
diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h b/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h
deleted file mode 100644 (file)
index 0805c7a..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef CCLayerTreeHostImpl_h
-#define CCLayerTreeHostImpl_h
-
-#include "cc/CCThread.h"
-#include <wtf/RefPtr.h>
-#include <wtf/ThreadSafeRefCounted.h>
-
-namespace WebCore {
-
-// Provides scheduling infrastructure for a CCLayerTreeHostImpl
-class CCLayerTreeHostImplClient  {
-public:
-    virtual void postDrawLayersTaskOnCCThread() = 0;
-    virtual void requestFrameAndCommitOnCCThread(double frameBeginTime) = 0;
-
-protected:
-    virtual ~CCLayerTreeHostImplClient() { }
-};
-
-// CCLayerTreeHostImpl owns the CCLayerImpl tree as well as associated rendering state
-class CCLayerTreeHostImpl {
-    WTF_MAKE_NONCOPYABLE(CCLayerTreeHostImpl);
-public:
-    explicit CCLayerTreeHostImpl(CCLayerTreeHostImplClient*);
-    virtual ~CCLayerTreeHostImpl();
-
-    virtual void beginCommit();
-    virtual void commitComplete();
-
-    void drawLayers();
-    virtual void drawLayersAndPresent() = 0;
-
-    int frameNumber() const { return m_frameNumber; }
-
-    void setNeedsRedraw();
-    void setNeedsCommitAndRedraw();
-
-    int sourceFrameNumber() const { return m_sourceFrameNumber; }
-    void setSourceFrameNumber(int frameNumber) { m_sourceFrameNumber = frameNumber; }
-
-protected:
-    int m_sourceFrameNumber;
-    int m_frameNumber;
-
-private:
-    CCLayerTreeHostImplClient* m_client;
-    bool m_commitPending;
-    bool m_redrawPending;
-};
-
-};
-
-#endif
diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp b/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp
deleted file mode 100644 (file)
index fc172f2..0000000
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "cc/CCLayerTreeHostImplProxy.h"
-
-#include "TraceEvent.h"
-#include "cc/CCLayerTreeHost.h"
-#include "cc/CCMainThreadTask.h"
-#include "cc/CCThreadTask.h"
-
-
-using namespace WTF;
-
-namespace WebCore {
-
-namespace {
-CCThread* ccThread;
-int numProxies = 0;
-}
-
-CCLayerTreeHostImplProxy::CCLayerTreeHostImplProxy(CCLayerTreeHost* layerTreeHost)
-    : m_commitPending(false)
-    , m_layerTreeHost(layerTreeHost)
-{
-    TRACE_EVENT("CCLayerTreeHostImplProxy::CCLayerTreeHostImplProxy", this, 0);
-    ASSERT(isMainThread());
-    numProxies++;
-    if (!ccThread)
-        ccThread = CCThread::create().leakPtr();
-}
-
-
-void CCLayerTreeHostImplProxy::start()
-{
-    // Create LayerTreeHostImpl.
-    CCCompletionEvent completion;
-    ccThread->postTask(createCCThreadTask(this, &CCLayerTreeHostImplProxy::initImplOnCCThread, AllowCrossThreadAccess(&completion)));
-    completion.wait();
-}
-
-CCLayerTreeHostImplProxy::~CCLayerTreeHostImplProxy()
-{
-    TRACE_EVENT("CCLayerTreeHostImplProxy::~CCLayerTreeHostImplProxy", this, 0);
-    ASSERT(isMainThread());
-    ASSERT(!m_layerTreeHostImpl && !m_layerTreeHost); // make sure stop() got called.
-
-    numProxies--;
-    if (!numProxies) {
-        delete ccThread;
-        ccThread = 0;
-    }
-}
-
-bool CCLayerTreeHostImplProxy::isStarted() const
-{
-    return m_layerTreeHostImpl;
-}
-
-void CCLayerTreeHostImplProxy::setNeedsCommitAndRedraw()
-{
-    ASSERT(isMainThread());
-    if (m_commitPending)
-        return;
-
-    TRACE_EVENT("CCLayerTreeHostImplProxy::setNeedsCommitAndRedraw", this, 0);
-    m_commitPending = true;
-    ccThread->postTask(createCCThreadTask(this, &CCLayerTreeHostImplProxy::setNeedsCommitAndRedrawOnCCThread));
-}
-
-void CCLayerTreeHostImplProxy::setNeedsRedraw()
-{
-    ASSERT(isMainThread());
-    ccThread->postTask(createCCThreadTask(this, &CCLayerTreeHostImplProxy::setNeedsRedrawOnCCThread));
-}
-
-void CCLayerTreeHostImplProxy::stop()
-{
-    TRACE_EVENT("CCLayerTreeHostImplProxy::stop", this, 0);
-    ASSERT(isMainThread());
-    // Synchronously deletes the impl.
-    CCCompletionEvent completion;
-    ccThread->postTask(createCCThreadTask(this, &CCLayerTreeHostImplProxy::layerTreeHostClosedOnCCThread, AllowCrossThreadAccess(&completion)));
-    completion.wait();
-
-    ASSERT(!m_layerTreeHostImpl); // verify that the impl deleted.
-    m_layerTreeHost = 0;
-}
-
-void CCLayerTreeHostImplProxy::postDrawLayersTaskOnCCThread()
-{
-    ASSERT(isCCThread());
-    if (m_layerTreeHostImpl)
-        ccThread->postTask(createCCThreadTask(this, &CCLayerTreeHostImplProxy::drawLayersOnCCThread));
-}
-
-void CCLayerTreeHostImplProxy::requestFrameAndCommitOnCCThread(double frameBeginTime)
-{
-    TRACE_EVENT("CCLayerTreeHostImplProxy::requestFrameAndCommitOnCCThread", this, 0);
-    ASSERT(isCCThread());
-    if (m_layerTreeHostImpl)
-        CCMainThread::postTask(createMainThreadTask(this, &CCLayerTreeHostImplProxy::requestFrameAndCommit, frameBeginTime));
-}
-
-bool CCLayerTreeHostImplProxy::isMainThread() const
-{
-    return ::isMainThread();
-}
-
-bool CCLayerTreeHostImplProxy::isCCThread() const
-{
-    return currentThread() == ccThread->threadID();
-}
-
-void CCLayerTreeHostImplProxy::requestFrameAndCommit(double frameBeginTime)
-{
-    ASSERT(isMainThread());
-    if (!m_layerTreeHost)
-        return;
-
-    TRACE_EVENT("CCLayerTreeHostImplProxy::requestFrameAndCommit", this, 0);
-    {
-        TRACE_EVENT("CCLayerTreeHost::animateAndLayout", this, 0);
-        m_layerTreeHost->animateAndLayout(frameBeginTime);
-    }
-
-    m_commitPending = false;
-    {
-        TRACE_EVENT("CCLayerTreeHost::updateLayers", this, 0);
-        m_layerTreeHost->updateLayers();
-    }
-
-    OwnPtr<CCLayerTreeHostCommitter> committer = m_layerTreeHost->createLayerTreeHostCommitter();
-    m_layerTreeHost->beginCommit();
-
-    // Blocking call to CCLayerTreeHostImplProxy::performCommit
-    CCCompletionEvent completion;
-    ccThread->postTask(createCCThreadTask(this, &CCLayerTreeHostImplProxy::commitOnCCThread, AllowCrossThreadAccess(committer.get()), AllowCrossThreadAccess(&completion)));
-    completion.wait();
-
-    committer.clear();
-
-    m_layerTreeHost->commitComplete();
-}
-
-void CCLayerTreeHostImplProxy::commitOnCCThread(CCLayerTreeHostCommitter* committer, CCCompletionEvent* completion)
-{
-    ASSERT(isCCThread());
-    TRACE_EVENT("CCLayerTreeHostImplProxy::commitOnCCThread", this, 0);
-    m_layerTreeHostImpl->beginCommit();
-    {
-        TRACE_EVENT("CCLayerTreeHost::commit", this, 0);
-        committer->commit(m_layerTreeHost, m_layerTreeHostImpl.get());
-    }
-    completion->signal();
-
-    m_layerTreeHostImpl->commitComplete();
-}
-
-void CCLayerTreeHostImplProxy::drawLayersOnCCThread()
-{
-    TRACE_EVENT("CCLayerTreeHostImplProxy::drawLayersOnCCThread", this, 0);
-    ASSERT(isCCThread());
-    if (m_layerTreeHostImpl)
-        m_layerTreeHostImpl->drawLayers();
-}
-
-void CCLayerTreeHostImplProxy::setNeedsCommitAndRedrawOnCCThread()
-{
-    TRACE_EVENT("CCLayerTreeHostImplProxy::setNeedsCommitAndRedrawOnCCThread", this, 0);
-    ASSERT(isCCThread() && m_layerTreeHostImpl);
-    m_layerTreeHostImpl->setNeedsCommitAndRedraw();
-}
-
-void CCLayerTreeHostImplProxy::setNeedsRedrawOnCCThread()
-{
-    TRACE_EVENT("CCLayerTreeHostImplProxy::setNeedsRedrawOnCCThread", this, 0);
-    ASSERT(isCCThread() && m_layerTreeHostImpl);
-    m_layerTreeHostImpl->setNeedsRedraw();
-}
-
-void CCLayerTreeHostImplProxy::initImplOnCCThread(CCCompletionEvent* completion)
-{
-    TRACE_EVENT("CCLayerTreeHostImplProxy::initImplOnCCThread", this, 0);
-    ASSERT(isCCThread());
-    m_layerTreeHostImpl = createLayerTreeHostImpl();
-    completion->signal();
-}
-
-void CCLayerTreeHostImplProxy::layerTreeHostClosedOnCCThread(CCCompletionEvent* completion)
-{
-    TRACE_EVENT("CCLayerTreeHostImplProxy::layerTreeHostClosedOnCCThread", this, 0);
-    ASSERT(isCCThread());
-    m_layerTreeHostImpl.clear();
-    completion->signal();
-}
-
-}
diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h b/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h
deleted file mode 100644 (file)
index 295be3c..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef CCLayerTreeHostImplProxy_h
-#define CCLayerTreeHostImplProxy_h
-
-#include "cc/CCCompletionEvent.h"
-#include "cc/CCLayerTreeHostImpl.h"
-#include <wtf/OwnPtr.h>
-
-namespace WebCore {
-
-class CCLayerTreeHost;
-class CCLayerTreeHostCommitter;
-
-class CCLayerTreeHostImplProxy : public CCLayerTreeHostImplClient {
-    WTF_MAKE_NONCOPYABLE(CCLayerTreeHostImplProxy);
-public:
-    virtual ~CCLayerTreeHostImplProxy();
-
-    bool isStarted() const;
-
-    void setNeedsCommitAndRedraw();
-    void setNeedsRedraw();
-
-    void start(); // Must be called before using the proxy.
-    void stop(); // Must be called before deleting the proxy.
-
-    // CCLayerTreeHostImplCient -- called on CCThread
-    virtual void postDrawLayersTaskOnCCThread();
-    virtual void requestFrameAndCommitOnCCThread(double frameBeginTime);
-
-protected:
-    explicit CCLayerTreeHostImplProxy(CCLayerTreeHost*);
-    virtual PassOwnPtr<CCLayerTreeHostImpl> createLayerTreeHostImpl() = 0;
-    CCLayerTreeHost* host() const { return m_layerTreeHost; }
-
-private:
-    bool isMainThread() const;
-    bool isCCThread() const;
-
-    // Called on CCMainThread
-    void requestFrameAndCommit(double frameBeginTime);
-
-    // Called on CCThread
-    void commitOnCCThread(CCLayerTreeHostCommitter*, CCCompletionEvent*);
-    void drawLayersOnCCThread();
-    void initImplOnCCThread(CCCompletionEvent*);
-    void setNeedsCommitAndRedrawOnCCThread();
-    void setNeedsRedrawOnCCThread();
-    void layerTreeHostClosedOnCCThread(CCCompletionEvent*);
-
-    // Used on main-thread only.
-    bool m_commitPending;
-
-    // Accessed on main thread only.
-    CCLayerTreeHost* m_layerTreeHost;
-
-    // Used on the CCThread, but checked on main thread during initialization/shutdown.
-    OwnPtr<CCLayerTreeHostImpl> m_layerTreeHostImpl;
-};
-
-}
-
-#endif
index fac6e64..7de8d71 100644 (file)
@@ -24,9 +24,9 @@
 #ifndef CCMainThreadTask_h
 #define CCMainThreadTask_h
 
+#include "CCMainThread.h"
 #include "CrossThreadCopier.h"
 #include "CrossThreadTask.h"
-#include "cc/CCMainThread.h"
 #include <wtf/PassOwnPtr.h>
 #include <wtf/PassRefPtr.h>
 
index de173a1..9566584 100644 (file)
@@ -27,7 +27,6 @@
 #include "CCThread.h"
 
 #include "LayerRendererChromium.h"
-#include "TraceEvent.h"
 #include <wtf/CurrentTime.h>
 #include <wtf/PassOwnPtr.h>
 #include <wtf/ThreadingPrimitives.h>
@@ -65,7 +64,6 @@ void* CCThread::compositorThreadStart(void* userdata)
 
 void* CCThread::runLoop()
 {
-    TRACE_EVENT("CCThread::runLoop", this, 0);
     {
         // Wait for CCThread::start() to complete to have m_threadID
         // established before starting the main loop.
index 91c58e5..71245d3 100644 (file)
@@ -24,9 +24,9 @@
 #ifndef CCThreadTask_h
 #define CCThreadTask_h
 
+#include "CCThread.h"
 #include "CrossThreadCopier.h"
 #include "CrossThreadTask.h"
-#include "cc/CCThread.h"
 #include <wtf/PassOwnPtr.h>
 #include <wtf/PassRefPtr.h>
 
index 13fd9d6..449dda8 100644 (file)
@@ -1,3 +1,36 @@
+2011-06-24  Nat Duca  <nduca@chromium.org>
+
+        Unreviewed, rolling out r89694.
+        http://trac.webkit.org/changeset/89694
+        https://bugs.webkit.org/show_bug.cgi?id=58408
+
+        Test shell still not ready for animate changes.
+
+        * WebKit.gypi:
+        * public/WebWidget.h:
+        (WebKit::WebWidget::animate):
+        (WebKit::WebWidget::composite):
+        * src/WebPopupMenuImpl.cpp:
+        (WebKit::WebPopupMenuImpl::animate):
+        * src/WebPopupMenuImpl.h:
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::resize):
+        (WebKit::WebViewImpl::animate):
+        (WebKit::WebViewImpl::paint):
+        (WebKit::WebViewImpl::composite):
+        (WebKit::WebViewImpl::fullFramePluginZoomLevelChanged):
+        (WebKit::WebView::zoomLevelToZoomFactor):
+        (WebKit::WebViewImpl::setRootLayerNeedsDisplay):
+        (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+        (WebKit::WebViewImpl::doComposite):
+        (WebKit::WebViewImpl::reallocateRenderer):
+        (WebKit::WebViewImpl::updateLayerRendererViewport):
+        (WebKit::WebViewImpl::graphicsContext3D):
+        * src/WebViewImpl.h:
+        * tests/CCLayerTreeHostTest.cpp: Removed.
+        * tests/CCThreadTest.cpp:
+        (WebCore::TEST):
+
 2011-05-17  Nat Duca  <nduca@chromium.org>
 
         Reviewed by James Robinson.
index c4ca90d..f2a0dc7 100644 (file)
         'webkit_unittest_files': [
             'tests/ArenaTestHelpers.h',
             'tests/AssociatedURLLoaderTest.cpp',
-            'tests/CCLayerTreeHostTest.cpp',
+            'tests/InnerGestureRecognizerTest.cpp',
             'tests/CCThreadTaskTest.cpp',
             'tests/CCThreadTest.cpp',
             'tests/IDBBindingUtilitiesTest.cpp',
             'tests/IDBKeyPathTest.cpp',
             'tests/IDBLevelDBCodingTest.cpp',
-            'tests/InnerGestureRecognizerTest.cpp',
             'tests/KeyboardTest.cpp',
             'tests/KURLTest.cpp',
             'tests/PODArenaTest.cpp',
index f6e73f1..7434412 100644 (file)
@@ -47,9 +47,6 @@ class WebString;
 struct WebPoint;
 template <typename T> class WebVector;
 
-// FIXME: remove this define once render_widget has been changed to issue threaded compositor calls
-#define WEBWIDGET_HAS_ANIMATE_CHANGES 1
-
 class WebWidget {
 public:
     // This method closes and deletes the WebWidget.
@@ -71,17 +68,15 @@ public:
     // willStartLiveResize.
     virtual void willEndLiveResize() { }
 
-    // Called to update imperative animation state. This should be called before
-    // paint, although the client can rate-limit these calls. When
-    // frameBeginTime is 0.0, the WebWidget will determine the frame begin time
-    // itself.
-    virtual void animate(double frameBeginTime) { }
+    // Called to update imperative animation state.  This should be called before
+    // paint, although the client can rate-limit these calls.
+    virtual void animate() { }
 
     // Called to layout the WebWidget.  This MUST be called before Paint,
     // and it may result in calls to WebWidgetClient::didInvalidateRect.
     virtual void layout() { }
 
-    // Called to paint the rectangular region within the WebWidget
+    // Called to paint the rectangular region within the WebWidget 
     // onto the specified canvas at (viewPort.x,viewPort.y). You MUST call
     // Layout before calling this method.  It is okay to call paint
     // multiple times once layout has been called, assuming no other
@@ -90,15 +85,12 @@ public:
     // warranted before painting again).
     virtual void paint(WebCanvas*, const WebRect& viewPort) { }
 
-    // In non-threaded compositing mode, triggers compositing of the current
-    // layers onto the screen. You MUST call Layout before calling this method, for the same
-    // reasons described in the paint method above
-    //
-    // In threaded compositing mode, indicates that the widget should update
-    // itself, for example due to window damage. The redraw will begin
-    // asynchronously and perform layout and animation internally. Do not call
-    // animate or layout in this case.
-    virtual void composite(bool finish) = 0;
+    // Triggers compositing of the current layers onto the screen.
+    // The finish argument controls whether the compositor will wait for the
+    // GPU to finish rendering before returning. You MUST call Layout
+    // before calling this method, for the same reasons described in
+    // the paint method above.
+    virtual void composite(bool finish) { }
 
     // Called to inform the WebWidget of a change in theme.
     // Implementors that cache rendered copies of widgets need to re-render
index 409e6f7..5cbf5ff 100644 (file)
@@ -167,7 +167,7 @@ void WebPopupMenuImpl::willEndLiveResize()
 {
 }
 
-void WebPopupMenuImpl::animate(double)
+void WebPopupMenuImpl::animate()
 {
 }
 
index 45e8897..a91faf1 100644 (file)
@@ -65,7 +65,7 @@ public:
     virtual void willStartLiveResize();
     virtual void resize(const WebSize&);
     virtual void willEndLiveResize();
-    virtual void animate(double frameBeginTime);
+    virtual void animate();
     virtual void layout();
     virtual void paint(WebCanvas* canvas, const WebRect& rect);
     virtual void themeChanged();
index b850270..022a2e1 100644 (file)
 #include <cmath> // for std::pow
 
 using namespace WebCore;
-using namespace std;
 
 namespace {
 
@@ -1005,8 +1004,8 @@ void WebViewImpl::resize(const WebSize& newSize)
 
 #if USE(ACCELERATED_COMPOSITING)
     if (m_layerRenderer && isAcceleratedCompositingActive()) {
-        m_layerRenderer->resizeOnscreenContent(IntSize(max(1, m_size.width),
-                                                       max(1, m_size.height)));
+        m_layerRenderer->resizeOnscreenContent(IntSize(std::max(1, m_size.width),
+                                                       std::max(1, m_size.height)));
     }
 #endif
 }
@@ -1017,21 +1016,17 @@ void WebViewImpl::willEndLiveResize()
         mainFrameImpl()->frameView()->willEndLiveResize();
 }
 
-void WebViewImpl::animate(double frameBeginTime)
+void WebViewImpl::animate()
 {
-#if ENABLE(REQUEST_ANIMATION_FRAME)
     TRACE_EVENT("WebViewImpl::animate", this, 0);
-    // FIXME: remove this zero-check once render_widget has been modified to
-    // pass in a frameBeginTime.
-    if (!frameBeginTime)
-        frameBeginTime = currentTime();
+#if ENABLE(REQUEST_ANIMATION_FRAME)
     WebFrameImpl* webframe = mainFrameImpl();
     if (webframe) {
         FrameView* view = webframe->frameView();
         if (view) {
             if (m_layerRenderer)
                 m_layerRenderer->setIsAnimating(true);
-            view->serviceScriptedAnimations(convertSecondsToDOMTimeStamp(frameBeginTime));
+            view->serviceScriptedAnimations(convertSecondsToDOMTimeStamp(currentTime()));
             if (m_layerRenderer)
                 m_layerRenderer->setIsAnimating(false);
         }
@@ -1100,10 +1095,6 @@ void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect)
 {
     if (isAcceleratedCompositingActive()) {
 #if USE(ACCELERATED_COMPOSITING)
-#if USE(THREADED_COMPOSITING)
-        // FIXME: do readback in threaded compositing mode rather than returning nothing
-        return;
-#endif
         doComposite();
 
         // If a canvas was passed in, we use it to grab a copy of the
@@ -1137,29 +1128,16 @@ void WebViewImpl::themeChanged()
     view->invalidateRect(damagedRect);
 }
 
-void WebViewImpl::animateAndLayout(double frameBeginTime)
-{
-    animate(frameBeginTime);
-    layout();
-}
-
-void WebViewImpl::updateLayers()
+void WebViewImpl::composite(bool finish)
 {
+#if USE(ACCELERATED_COMPOSITING)
     // Update the compositing requirements for all frame in the tree before doing any painting
     // as the compositing requirements for a RenderLayer within a subframe might change.
     for (Frame* frame = page()->mainFrame(); frame; frame = frame->tree()->traverseNext())
         frame->view()->updateCompositingLayers();
     page()->mainFrame()->view()->syncCompositingStateIncludingSubframes();
-}
 
-void WebViewImpl::composite(bool finish)
-{
-#if USE(ACCELERATED_COMPOSITING)
-#if USE(THREADED_COMPOSITING)
-    m_layerRenderer->setNeedsRedraw();
-#else
     TRACE_EVENT("WebViewImpl::composite", this, 0);
-
     if (m_recreatingGraphicsContext) {
         // reallocateRenderer will request a repaint whether or not it succeeded
         // in creating a new context.
@@ -1169,6 +1147,10 @@ void WebViewImpl::composite(bool finish)
     }
     doComposite();
 
+    // Finish if requested.
+    if (finish)
+        m_layerRenderer->finish();
+
     // Put result onscreen.
     m_layerRenderer->present();
 
@@ -1183,7 +1165,6 @@ void WebViewImpl::composite(bool finish)
         setRootLayerNeedsDisplay();
     }
 #endif
-#endif
 }
 
 const WebInputEvent* WebViewImpl::m_currentInputEvent = 0;
@@ -1797,13 +1778,13 @@ void WebViewImpl::fullFramePluginZoomLevelChanged(double zoomLevel)
     if (zoomLevel == m_zoomLevel)
         return;
 
-    m_zoomLevel = max(min(zoomLevel, m_maximumZoomLevel), m_minimumZoomLevel);
+    m_zoomLevel = std::max(std::min(zoomLevel, m_maximumZoomLevel), m_minimumZoomLevel);
     m_client->zoomLevelChanged();
 }
 
 double WebView::zoomLevelToZoomFactor(double zoomLevel)
 {
-    return pow(textSizeMultiplierRatio, zoomLevel);
+    return std::pow(textSizeMultiplierRatio, zoomLevel);
 }
 
 double WebView::zoomFactorToZoomLevel(double factor)
@@ -2437,12 +2418,7 @@ void WebViewImpl::setRootPlatformLayer(WebCore::PlatformLayer* layer)
 
 void WebViewImpl::setRootLayerNeedsDisplay()
 {
-#if USE(THREADED_COMPOSITING)
-    if (m_layerRenderer)
-        m_layerRenderer->setNeedsCommitAndRedraw();
-#else
     m_client->scheduleComposite();
-#endif
 }
 
 
@@ -2514,16 +2490,22 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
         m_client->didActivateAcceleratedCompositing(false);
     } else if (m_layerRenderer) {
         m_isAcceleratedCompositingActive = true;
-        m_layerRenderer->resizeOnscreenContent(WebCore::IntSize(max(1, m_size.width),
-                                                                max(1, m_size.height)));
+        m_layerRenderer->resizeOnscreenContent(WebCore::IntSize(std::max(1, m_size.width),
+                                                                std::max(1, m_size.height)));
 
         m_client->didActivateAcceleratedCompositing(true);
     } else {
         TRACE_EVENT("WebViewImpl::setIsAcceleratedCompositingActive(true)", this, 0);
+        RefPtr<GraphicsContext3D> context = m_temporaryOnscreenGraphicsContext3D.release();
+        if (!context) {
+            context = GraphicsContext3D::create(getCompositorContextAttributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow);
+            if (context)
+                context->reshape(std::max(1, m_size.width), std::max(1, m_size.height));
+        }
+
 
-        m_layerRenderer = LayerRendererChromium::create(this, WebViewImplContentPainter::create(this), m_page->settings()->acceleratedDrawingEnabled());
+        m_layerRenderer = LayerRendererChromium::create(context.release(), WebViewImplContentPainter::create(this), m_page->settings()->acceleratedDrawingEnabled());
         if (m_layerRenderer) {
-            updateLayerRendererSettings();
             m_client->didActivateAcceleratedCompositing(true);
             m_isAcceleratedCompositingActive = true;
             m_compositorCreationFailed = false;
@@ -2551,43 +2533,39 @@ void WebViewImpl::doComposite()
     if (!page())
         return;
 
+    m_layerRenderer->setCompositeOffscreen(settings()->compositeToTextureEnabled());
+
+    CCHeadsUpDisplay* hud = m_layerRenderer->headsUpDisplay();
+    hud->setShowFPSCounter(settings()->showFPSCounter());
+    hud->setShowPlatformLayerTree(settings()->showPlatformLayerTree());
+
     if (m_pageOverlay)
         m_pageOverlay->update();
 
-    m_layerRenderer->updateLayers();
-    m_layerRenderer->drawLayers();
-}
-
-PassRefPtr<GraphicsContext3D> WebViewImpl::createLayerTreeHostContext3D()
-{
-    RefPtr<GraphicsContext3D> context = m_temporaryOnscreenGraphicsContext3D.release();
-    if (!context) {
-        context = GraphicsContext3D::create(getCompositorContextAttributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow);
-        if (context)
-            context->reshape(max(1, m_size.width), max(1, m_size.height));
-    }
-    return context;
+    m_layerRenderer->updateAndDrawLayers();
 }
 
 void WebViewImpl::reallocateRenderer()
 {
+    RefPtr<GraphicsContext3D> newContext = m_temporaryOnscreenGraphicsContext3D.get();
+    WebGraphicsContext3D* webContext = GraphicsContext3DInternal::extractWebGraphicsContext3D(newContext.get());
+    if (!newContext || !webContext || webContext->isContextLost())
+        newContext = GraphicsContext3D::create(
+            getCompositorContextAttributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow);
     // GraphicsContext3D::create might fail and return 0, in that case LayerRendererChromium::create will also return 0.
-    RefPtr<LayerRendererChromium> layerRenderer = LayerRendererChromium::create(this, WebViewImplContentPainter::create(this), m_page->settings()->acceleratedDrawingEnabled());
+    RefPtr<LayerRendererChromium> layerRenderer = LayerRendererChromium::create(newContext, WebViewImplContentPainter::create(this), m_page->settings()->acceleratedDrawingEnabled());
 
     // Reattach the root layer.  Child layers will get reattached as a side effect of updateLayersRecursive.
     if (layerRenderer) {
         m_layerRenderer->transferRootLayer(layerRenderer.get());
         m_layerRenderer = layerRenderer;
-        updateLayerRendererSettings();
-
         // FIXME: In MacOS newContext->reshape method needs to be called to
         // allocate IOSurfaces. All calls to create a context followed by
         // reshape should really be extracted into one function; it is not
         // immediately obvious that GraphicsContext3D object will not
         // function properly until its reshape method is called.
-        layerRenderer->context()->reshape(max(1, m_size.width), max(1, m_size.height));
+        newContext->reshape(std::max(1, m_size.width), std::max(1, m_size.height));
         setRootPlatformLayer(m_layerRenderer->rootLayer());
-
         // Forces ViewHostMsg_DidActivateAcceleratedCompositing to be sent so
         // that the browser process can reacquire surfaces.
         m_client->didActivateAcceleratedCompositing(true);
@@ -2598,18 +2576,10 @@ void WebViewImpl::reallocateRenderer()
 }
 #endif
 
-void WebViewImpl::updateLayerRendererSettings()
+void WebViewImpl::updateLayerRendererViewport()
 {
     ASSERT(m_layerRenderer);
-    m_layerRenderer->setCompositeOffscreen(settings()->compositeToTextureEnabled());
-
-    CCHeadsUpDisplay* hud = m_layerRenderer->headsUpDisplay();
-    hud->setShowFPSCounter(settings()->showFPSCounter());
-    hud->setShowPlatformLayerTree(settings()->showPlatformLayerTree());
-}
 
-void WebViewImpl::updateLayerRendererViewport()
-{
     if (!page())
         return;
 
@@ -2637,7 +2607,7 @@ WebGraphicsContext3D* WebViewImpl::graphicsContext3D()
         }
         m_temporaryOnscreenGraphicsContext3D = GraphicsContext3D::create(getCompositorContextAttributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow);
         if (m_temporaryOnscreenGraphicsContext3D)
-            m_temporaryOnscreenGraphicsContext3D->reshape(max(1, m_size.width), max(1, m_size.height));
+            m_temporaryOnscreenGraphicsContext3D->reshape(std::max(1, m_size.width), std::max(1, m_size.height));
         return GraphicsContext3DInternal::extractWebGraphicsContext3D(m_temporaryOnscreenGraphicsContext3D.get());
     }
 #endif
index 6553b58..6d897df 100644 (file)
@@ -56,7 +56,6 @@ namespace WebCore {
 class ChromiumDataObject;
 class DocumentLoader;
 class Frame;
-class GraphicsContext3D;
 class HistoryItem;
 class HitTestResult;
 class KeyboardEvent;
@@ -88,7 +87,7 @@ class WebMouseWheelEvent;
 class WebSettingsImpl;
 class WebTouchEvent;
 
-class WebViewImpl : public WebView, public WebCore::CCLayerTreeHostClient, public RefCounted<WebViewImpl> {
+class WebViewImpl : public WebView, public RefCounted<WebViewImpl> {
 public:
     // WebWidget methods:
     virtual void close();
@@ -96,7 +95,7 @@ public:
     virtual void willStartLiveResize();
     virtual void resize(const WebSize&);
     virtual void willEndLiveResize();
-    virtual void animate(double frameBeginTime);
+    virtual void animate();
     virtual void layout();
     virtual void paint(WebCanvas*, const WebRect&);
     virtual void themeChanged();
@@ -203,11 +202,6 @@ public:
                                     unsigned inactiveForegroundColor);
     virtual void performCustomContextMenuAction(unsigned action);
 
-    // CCLayerTreeHostClient
-    virtual void animateAndLayout(double frameBeginTime);
-    virtual PassRefPtr<WebCore::GraphicsContext3D> createLayerTreeHostContext3D();
-    virtual void updateLayers();
-
     // WebViewImpl
 
     void setIgnoreInputEvents(bool newValue);
@@ -362,7 +356,6 @@ public:
     void setRootLayerNeedsDisplay();
     void scrollRootLayerRect(const WebCore::IntSize& scrollDelta, const WebCore::IntRect& clipRect);
     void invalidateRootLayerRect(const WebCore::IntRect&);
-    void doUpdateAndComposite();
 #endif
 
     // Returns the onscreen 3D context used by the compositor. This is
@@ -430,7 +423,6 @@ private:
     void doComposite();
     void doPixelReadbackToCanvas(WebCanvas*, const WebCore::IntRect&);
     void reallocateRenderer();
-    void updateLayerRendererSettings();
     void updateLayerRendererViewport();
 #endif
 
diff --git a/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp b/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp
deleted file mode 100644 (file)
index d854806..0000000
+++ /dev/null
@@ -1,538 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#if USE(THREADED_COMPOSITING)
-
-#include "cc/CCLayerTreeHost.h"
-
-#include "GraphicsContext3D.h"
-#include "cc/CCLayerTreeHostImpl.h"
-#include "cc/CCMainThreadTask.h"
-#include "cc/CCThreadTask.h"
-#include <gtest/gtest.h>
-#include <webkit/support/webkit_support.h>
-#include <wtf/MainThread.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/Vector.h>
-
-
-using namespace WebCore;
-using namespace WTF;
-
-namespace {
-
-class MockLayerTreeHost;
-class MockLayerTreeHostClient;
-class MockLayerTreeHostImpl;
-
-// The CCLayerTreeHostTest runs with the main loop running. It instantiates a single MockLayerTreeHost and associated
-// MockLayerTreeHostImpl/MockLayerTreeHostClient.
-//
-// beginTest() is called once the main message loop is running and the layer tree host is initialized.
-//
-// Key stages of the drawing loop, e.g. drawing or commiting, redirect to CCLayerTreeHostTest methods of similar names.
-// To track the commit process, override these functions.
-//
-// The test continues until someone calls endTest. endTest can be called on any thread, but be aware that
-// ending the test is an asynchronous process.
-class CCLayerTreeHostTest : public testing::Test {
-public:
-    CCLayerTreeHostTest()
-        : m_beginning(false)
-        , m_endWhenBeginReturns(false)
-        , m_running(false)
-        , m_timedOut(false) { }
-
-    virtual void afterTest() = 0;
-
-    virtual void beginTest() = 0;
-    virtual void animateAndLayout(MockLayerTreeHostClient* layerTreeHost, double frameBeginTime) { }
-    virtual void beginCommitOnCCThread(MockLayerTreeHostImpl* layerTreeHostImpl) { }
-    virtual void beginCommitOnMainThread(MockLayerTreeHost* layerTreeHost) { }
-    virtual void commitOnCCThread(MockLayerTreeHost* layerTreeHost, MockLayerTreeHostImpl* layerTreeHostImpl) { }
-    virtual void commitCompleteOnCCThread(MockLayerTreeHostImpl* layerTreeHostImpl) { }
-    virtual void commitCompleteOnMainThread(MockLayerTreeHost* layerTreeHost) { }
-    virtual void drawLayersAndPresentOnCCThread(MockLayerTreeHostImpl* layerTreeHostImpl) { }
-    virtual void updateLayers(MockLayerTreeHost* layerTreeHost) { }
-
-    void endTest();
-
-protected:
-    void doBeginTest();
-
-    static void onBeginTest(void* self)
-    {
-        static_cast<CCLayerTreeHostTest*>(self)->doBeginTest();
-    }
-
-    void doEndTest()
-    {
-    }
-
-    static void onEndTest(void* self)
-    {
-        ASSERT(isMainThread());
-        CCLayerTreeHostTest* test = static_cast<CCLayerTreeHostTest*>(self);
-        test->m_layerTreeHost.clear();
-        test->m_client.clear();
-        webkit_support::QuitMessageLoop();
-    }
-
-    void runTest()
-    {
-        webkit_support::PostDelayedTask(CCLayerTreeHostTest::onBeginTest, static_cast<void*>(this), 0);
-        webkit_support::PostDelayedTask(CCLayerTreeHostTest::testTimeout, static_cast<void*>(this), 5000);
-        webkit_support::RunMessageLoop();
-        m_running = false;
-        bool timedOut = m_timedOut; // Save whether we're timed out in case RunAllPendingMessages has the timeout.
-        webkit_support::RunAllPendingMessages();
-        if (timedOut) {
-            printf("Test timed out");
-            FAIL() << "Test timed out";
-            return;
-        }
-        afterTest();
-    }
-
-    static void testTimeout(void* self)
-    {
-        CCLayerTreeHostTest* test = static_cast<CCLayerTreeHostTest*>(self);
-        if (!test->m_running)
-            return;
-        test->m_timedOut = true;
-        test->endTest();
-    }
-
-    Mutex m_tracesLock;
-    Vector<std::string> m_traces;
-
-    OwnPtr<MockLayerTreeHostClient> m_client;
-    RefPtr<MockLayerTreeHost> m_layerTreeHost;
-
-private:
-    bool m_beginning;
-    bool m_endWhenBeginReturns;
-    bool m_running;
-    bool m_timedOut;
-};
-
-class MockLayerTreeHostClient : public CCLayerTreeHostClient {
-public:
-    MockLayerTreeHostClient(CCLayerTreeHostTest* test) : m_test(test) { }
-
-    virtual PassRefPtr<GraphicsContext3D> createLayerTreeHostContext3D()
-    {
-        return adoptRef<GraphicsContext3D>(0);
-    }
-
-    virtual void animateAndLayout(double frameBeginTime)
-    {
-        m_test->animateAndLayout(this, frameBeginTime);
-    }
-
-    virtual void updateLayers()
-    {
-    }
-
-private:
-    CCLayerTreeHostTest* m_test;
-};
-
-class MockLayerTreeHostCommitter : public CCLayerTreeHostCommitter {
-public:
-    static PassOwnPtr<MockLayerTreeHostCommitter> create(CCLayerTreeHostTest* test)
-    {
-        return adoptPtr(new MockLayerTreeHostCommitter(test));
-    }
-
-    virtual void commit(CCLayerTreeHost* host, CCLayerTreeHostImpl* hostImpl)
-    {
-        CCLayerTreeHostCommitter::commit(host, hostImpl);
-        m_test->commitOnCCThread(reinterpret_cast<MockLayerTreeHost*>(host), reinterpret_cast<MockLayerTreeHostImpl*>(hostImpl));
-    }
-
-private:
-    MockLayerTreeHostCommitter(CCLayerTreeHostTest* test) : m_test(test) { }
-    CCLayerTreeHostTest* m_test;
-};
-
-class MockLayerTreeHostImpl : public CCLayerTreeHostImpl {
-public:
-    static PassOwnPtr<MockLayerTreeHostImpl> create(CCLayerTreeHostImplClient* client, CCLayerTreeHostTest* test)
-    {
-        return adoptPtr(new MockLayerTreeHostImpl(client, test));
-    }
-
-    virtual void beginCommit()
-    {
-        CCLayerTreeHostImpl::beginCommit();
-        m_test->beginCommitOnCCThread(this);
-    }
-
-    virtual void commitComplete()
-    {
-        CCLayerTreeHostImpl::commitComplete();
-        m_test->commitCompleteOnCCThread(this);
-    }
-
-    virtual void drawLayersAndPresent()
-    {
-        m_test->drawLayersAndPresentOnCCThread(this);
-    }
-
-private:
-    MockLayerTreeHostImpl(CCLayerTreeHostImplClient* client, CCLayerTreeHostTest* test)
-            : CCLayerTreeHostImpl(client)
-            , m_test(test)
-    {
-    }
-
-    CCLayerTreeHostTest* m_test;
-};
-
-class MockLayerTreeHostImplProxy : public CCLayerTreeHostImplProxy {
-public:
-    static PassOwnPtr<MockLayerTreeHostImplProxy> create(CCLayerTreeHost* host, CCLayerTreeHostTest* test)
-    {
-        return adoptPtr(new MockLayerTreeHostImplProxy(host, test));
-    }
-
-    PassOwnPtr<CCLayerTreeHostImpl> createLayerTreeHostImpl()
-    {
-        return MockLayerTreeHostImpl::create(this, m_test);
-    }
-
-private:
-    MockLayerTreeHostImplProxy(CCLayerTreeHost* host, CCLayerTreeHostTest* test)
-        : CCLayerTreeHostImplProxy(host)
-        , m_test(test) { }
-
-    CCLayerTreeHostTest* m_test;
-};
-
-class MockLayerTreeHost : public CCLayerTreeHost {
-public:
-    MockLayerTreeHost(CCLayerTreeHostClient* client, CCLayerTreeHostTest* test)
-        : CCLayerTreeHost(client)
-        , m_test(test) { }
-
-    virtual PassOwnPtr<CCLayerTreeHostImplProxy> createLayerTreeHostImplProxy()
-    {
-        OwnPtr<CCLayerTreeHostImplProxy> proxy = MockLayerTreeHostImplProxy::create(this, m_test);
-        proxy->start();
-        return proxy.release();
-    }
-
-    virtual void updateLayers()
-    {
-        m_test->updateLayers(this);
-    }
-
-    virtual PassOwnPtr<CCLayerTreeHostCommitter> createLayerTreeHostCommitter()
-    {
-        return MockLayerTreeHostCommitter::create(m_test);
-    }
-
-    virtual void beginCommit()
-    {
-        CCLayerTreeHost::beginCommit();
-        m_test->beginCommitOnMainThread(this);
-    }
-
-    virtual void commitComplete()
-    {
-        m_test->commitCompleteOnMainThread(this);
-        CCLayerTreeHost::commitComplete();
-    }
-
-private:
-    CCLayerTreeHostTest* m_test;
-};
-
-void CCLayerTreeHostTest::doBeginTest()
-{
-    ASSERT(!m_running);
-    m_running = true;
-    m_client = adoptPtr(new MockLayerTreeHostClient(this));
-    m_layerTreeHost = adoptRef(new MockLayerTreeHost(m_client.get(), this));
-    m_layerTreeHost->init();
-    m_beginning = true;
-    beginTest();
-    m_beginning = false;
-    if (m_endWhenBeginReturns)
-        onEndTest(static_cast<void*>(this));
-}
-
-void CCLayerTreeHostTest::endTest()
-{
-    // If we are called from the CCThread, re-call endTest on the main thread.
-    if (!isMainThread())
-        CCMainThread::postTask(createMainThreadTask(this, &CCLayerTreeHostTest::endTest));
-    else {
-        // For the case where we endTest during beginTest(), set a flag to indicate that
-        // the test should end the second beginTest regains control.
-        if (m_beginning)
-            m_endWhenBeginReturns = true;
-        else
-            onEndTest(static_cast<void*>(this));
-    }
-}
-
-// Shortlived layerTreeHosts shouldn't die.
-class CCLayerTreeHostTestShortlived1 : public CCLayerTreeHostTest {
-public:
-    CCLayerTreeHostTestShortlived1() { }
-
-    virtual void beginTest()
-    {
-        endTest();
-    }
-
-    virtual void afterTest()
-    {
-    }
-};
-TEST_F(CCLayerTreeHostTestShortlived1, run)
-{
-    runTest();
-}
-
-// Shortlived layerTreeHosts shouldn't die with a commit in flight.
-class CCLayerTreeHostTestShortlived2 : public CCLayerTreeHostTest {
-public:
-    CCLayerTreeHostTestShortlived2() { }
-
-    virtual void beginTest()
-    {
-        m_layerTreeHost->setNeedsCommitAndRedraw();
-        endTest();
-    }
-
-    virtual void afterTest()
-    {
-    }
-};
-TEST_F(CCLayerTreeHostTestShortlived2, run)
-{
-    runTest();
-}
-
-// Shortlived layerTreeHosts shouldn't die with a redraw in flight.
-class CCLayerTreeHostTestShortlived3 : public CCLayerTreeHostTest {
-public:
-    CCLayerTreeHostTestShortlived3() { }
-
-    virtual void beginTest()
-    {
-        m_layerTreeHost->setNeedsRedraw();
-        endTest();
-    }
-
-    virtual void afterTest()
-    {
-    }
-};
-TEST_F(CCLayerTreeHostTestShortlived3, run)
-{
-    runTest();
-}
-
-// Constantly redrawing layerTreeHosts shouldn't die when they commit
-class CCLayerTreeHostTestCommitingWithContinuousRedraw : public CCLayerTreeHostTest {
-public:
-    CCLayerTreeHostTestCommitingWithContinuousRedraw()
-        : m_numCompleteCommits(0)
-        , m_numDraws(0)
-    {
-    }
-
-    virtual void beginTest()
-    {
-        m_layerTreeHost->setNeedsCommitAndRedraw();
-        endTest();
-    }
-
-    virtual void commitCompleteOnCCThread(MockLayerTreeHostImpl* layerTreeHostImpl)
-    {
-        m_numCompleteCommits++;
-        if (m_numCompleteCommits == 2)
-            endTest();
-    }
-
-    virtual void drawLayersAndPresentOnCCThread(MockLayerTreeHostImpl* layerTreeHostImpl)
-    {
-        if (m_numDraws == 1)
-            layerTreeHostImpl->setNeedsCommitAndRedraw();
-        m_numDraws++;
-        layerTreeHostImpl->setNeedsRedraw();
-    }
-
-    virtual void afterTest()
-    {
-    }
-
-private:
-    int m_numCompleteCommits;
-    int m_numDraws;
-};
-TEST_F(CCLayerTreeHostTestCommitingWithContinuousRedraw, run)
-{
-    runTest();
-}
-
-// Two setNeedsCommits in a row should lead to at least 1 commit and at least 1
-// draw with frame 0.
-class CCLayerTreeHostTestSetNeedsCommit1 : public CCLayerTreeHostTest {
-public:
-    CCLayerTreeHostTestSetNeedsCommit1()
-        : m_numCommits(0)
-        , m_numDraws(0)
-    {
-    }
-
-    virtual void beginTest()
-    {
-        m_layerTreeHost->setNeedsCommitAndRedraw();
-        m_layerTreeHost->setNeedsCommitAndRedraw();
-    }
-
-    virtual void drawLayersAndPresentOnCCThread(MockLayerTreeHostImpl* layerTreeHostImpl)
-    {
-        m_numDraws++;
-        if (!layerTreeHostImpl->sourceFrameNumber())
-            endTest();
-    }
-
-    virtual void commitOnCCThread(MockLayerTreeHost* layerTreeHost, MockLayerTreeHostImpl* impl)
-    {
-        m_numCommits++;
-    }
-
-    virtual void afterTest()
-    {
-        EXPECT_GE(1, m_numCommits);
-        EXPECT_GE(1, m_numDraws);
-    }
-
-private:
-    int m_numCommits;
-    int m_numDraws;
-};
-TEST_F(CCLayerTreeHostTestSetNeedsCommit1, run)
-{
-    runTest();
-}
-
-// A setNeedsCommit should lead to 1 commit. Issuing a second commit after that
-// first committed frame draws should lead to another commit.
-class CCLayerTreeHostTestSetNeedsCommit2 : public CCLayerTreeHostTest {
-public:
-    CCLayerTreeHostTestSetNeedsCommit2()
-        : m_numCommits(0)
-        , m_numDraws(0)
-    {
-    }
-
-    virtual void beginTest()
-    {
-        m_layerTreeHost->setNeedsCommitAndRedraw();
-    }
-
-    virtual void drawLayersAndPresentOnCCThread(MockLayerTreeHostImpl* layerTreeHostImpl)
-    {
-        if (!layerTreeHostImpl->sourceFrameNumber())
-            layerTreeHostImpl->setNeedsCommitAndRedraw();
-        else if (layerTreeHostImpl->sourceFrameNumber() == 1)
-            endTest();
-    }
-
-    virtual void commitOnCCThread(MockLayerTreeHost* layerTreeHost, MockLayerTreeHostImpl* impl)
-    {
-        m_numCommits++;
-    }
-
-    virtual void afterTest()
-    {
-        EXPECT_EQ(2, m_numCommits);
-        EXPECT_GE(2, m_numDraws);
-    }
-
-private:
-    int m_numCommits;
-    int m_numDraws;
-};
-TEST_F(CCLayerTreeHostTestSetNeedsCommit2, run)
-{
-    runTest();
-}
-
-// 1 setNeedsRedraw after the first commit has completed should lead to 1
-// additional draw.
-class CCLayerTreeHostTestSetNeedsRedraw : public CCLayerTreeHostTest {
-public:
-    CCLayerTreeHostTestSetNeedsRedraw()
-        : m_numCommits(0)
-        , m_numDraws(0)
-    {
-    }
-
-    virtual void beginTest()
-    {
-    }
-
-    virtual void drawLayersAndPresentOnCCThread(MockLayerTreeHostImpl* impl)
-    {
-        EXPECT_EQ(0, impl->sourceFrameNumber());
-        if (!m_numDraws)
-            impl->setNeedsRedraw(); // redraw again to verify that the second redraw doesnt commit.
-        else
-            endTest();
-        m_numDraws++;
-    }
-
-    virtual void commitOnCCThread(MockLayerTreeHost* layerTreeHost, MockLayerTreeHostImpl* impl)
-    {
-        m_numCommits++;
-    }
-
-    virtual void afterTest()
-    {
-        EXPECT_GE(2, m_numDraws);
-        EXPECT_EQ(1, m_numCommits);
-    }
-
-private:
-    int m_numCommits;
-    int m_numDraws;
-};
-TEST_F(CCLayerTreeHostTestSetNeedsRedraw, run)
-{
-    runTest();
-}
-
-} // namespace
-
-#endif // USE(THREADED_COMPOSITING)
index e0218ce..09c4193 100644 (file)
@@ -53,7 +53,7 @@ TEST(CCThreadTest, pingPongUsingCondition)
     OwnPtr<CCThread> thread = CCThread::create();
     PingPongUsingCondition target;
     CCCompletionEvent completion;
-    thread->postTask(createCCThreadTask(&target, &PingPongUsingCondition::ping,
+    thread->postTask(createCCThreadTask(&target, &PingPongUsingCondition::ping, 
                                         AllowCrossThreadAccess(&completion)));
     completion.wait();
 
index 7ad29f0..5cd64b3 100644 (file)
@@ -1,3 +1,14 @@
+2011-06-24  Nat Duca  <nduca@chromium.org>
+
+        Unreviewed, rolling out r89694.
+        http://trac.webkit.org/changeset/89694
+        https://bugs.webkit.org/show_bug.cgi?id=58408
+
+        Test shell still not ready for animate changes.
+
+        * DumpRenderTree/chromium/WebViewHost.cpp:
+        (WebViewHost::paintInvalidatedRegion):
+
 2011-06-24  Adam Roben  <aroben@apple.com>
 
         Fix typos introduced in r89696
index 33d5893..7ef47b3 100644 (file)
@@ -1486,7 +1486,7 @@ void WebViewHost::paintRect(const WebRect& rect)
 void WebViewHost::paintInvalidatedRegion()
 {
 #if ENABLE(REQUEST_ANIMATION_FRAME)
-    webWidget()->animate(0.0);
+    webWidget()->animate();
 #endif
     webWidget()->layout();
     WebSize widgetSize = webWidget()->size();