Changeset 89837 in webkit


Ignore:
Timestamp:
Jun 27, 2011 11:05:54 AM (13 years ago)
Author:
nduca@chromium.org
Message:

2011-05-17 Nat Duca <nduca@chromium.org>

Reviewed by James Robinson.

[chromium] Implement CCLayerTreeHost and CCLayerTreeHostImpl portions of threaded compositor
https://bugs.webkit.org/show_bug.cgi?id=58408

Create CCLayerTreeHost and CCLayerTreeHostImpl, which are the main
thread and compositor thread halves of a composited view. Communication
between the two is based on the design used in FileStreamProxy.

  • WebCore.gypi:
  • platform/chromium/TraceEvent.h:
  • platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::create): (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::setViewport): (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromiumImpl::create): (WebCore::LayerRendererChromiumImpl::drawLayersAndPresent): (WebCore::LayerRendererChromiumImpl::LayerRendererChromiumImpl): (WebCore::LayerRendererChromiumImpl::drawLayersOnMainThread): (WebCore::LayerRendererChromiumImplProxy::create): (WebCore::LayerRendererChromiumImplProxy::createLayerTreeHostImpl): (WebCore::LayerRendererChromiumImplProxy::LayerRendererChromiumImplProxy): (WebCore::LayerRendererChromium::createLayerTreeHostImplProxy):
  • platform/graphics/chromium/LayerRendererChromium.h:
  • platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::setShowFPSCounter): (WebCore::CCHeadsUpDisplay::setShowPlatformLayerTree):
  • platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (WebCore::CCHeadsUpDisplay::currentFrameNumber):
  • platform/graphics/chromium/cc/CCLayerTreeHost.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp. (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::init): (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::beginCommit): (WebCore::CCLayerTreeHost::commitComplete): (WebCore::CCLayerTreeHost::animateAndLayout): (WebCore::CCLayerTreeHost::createLayerTreeHostCommitter): (WebCore::CCLayerTreeHost::setNeedsCommitAndRedraw): (WebCore::CCLayerTreeHost::setNeedsRedraw): (WebCore::CCLayerTreeHost::updateLayers):
  • platform/graphics/chromium/cc/CCLayerTreeHost.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp. (WebCore::CCLayerTreeHost::frameNumber):
  • platform/graphics/chromium/cc/CCLayerTreeHostCommitter.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp. (WebCore::CCLayerTreeHostCommitter::create): (WebCore::CCLayerTreeHostCommitter::commit):
  • platform/graphics/chromium/cc/CCLayerTreeHostCommitter.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp. (WebCore::CCLayerTreeHostCommitter::CCLayerTreeHostCommitter):
  • platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: Added. (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::~CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::beginCommit): (WebCore::CCLayerTreeHostImpl::commitComplete): (WebCore::CCLayerTreeHostImpl::drawLayers): (WebCore::CCLayerTreeHostImpl::setNeedsCommitAndRedraw): (WebCore::CCLayerTreeHostImpl::setNeedsRedraw):
  • platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp. (WebCore::CCLayerTreeHostImplClient::~CCLayerTreeHostImplClient): (WebCore::CCLayerTreeHostImpl::frameNumber): (WebCore::CCLayerTreeHostImpl::sourceFrameNumber): (WebCore::CCLayerTreeHostImpl::setSourceFrameNumber):
  • platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp: Added. (WebCore::CCLayerTreeHostImplProxy::CCLayerTreeHostImplProxy): (WebCore::CCLayerTreeHostImplProxy::start): (WebCore::CCLayerTreeHostImplProxy::~CCLayerTreeHostImplProxy): (WebCore::CCLayerTreeHostImplProxy::isStarted): (WebCore::CCLayerTreeHostImplProxy::setNeedsCommitAndRedraw): (WebCore::CCLayerTreeHostImplProxy::setNeedsRedraw): (WebCore::CCLayerTreeHostImplProxy::stop): (WebCore::CCLayerTreeHostImplProxy::postDrawLayersTaskOnCCThread): (WebCore::CCLayerTreeHostImplProxy::requestFrameAndCommitOnCCThread): (WebCore::CCLayerTreeHostImplProxy::isMainThread): (WebCore::CCLayerTreeHostImplProxy::isCCThread): (WebCore::CCLayerTreeHostImplProxy::requestFrameAndCommit): (WebCore::CCLayerTreeHostImplProxy::commitOnCCThread): (WebCore::CCLayerTreeHostImplProxy::drawLayersOnCCThread): (WebCore::CCLayerTreeHostImplProxy::setNeedsCommitAndRedrawOnCCThread): (WebCore::CCLayerTreeHostImplProxy::setNeedsRedrawOnCCThread): (WebCore::CCLayerTreeHostImplProxy::initImplOnCCThread): (WebCore::CCLayerTreeHostImplProxy::layerTreeHostClosedOnCCThread):
  • platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h: Added. (WebCore::CCLayerTreeHostImplProxy::host):
  • platform/graphics/chromium/cc/CCMainThreadTask.h:
  • platform/graphics/chromium/cc/CCThread.cpp: (WebCore::CCThread::runLoop):
  • platform/graphics/chromium/cc/CCThreadTask.h:

2011-05-17 Nat Duca <nduca@chromium.org>

Reviewed by James Robinson.

[chromium] Implement CCLayerTreeHost and CCLayerTreeHostImpl portions of threaded compositor
https://bugs.webkit.org/show_bug.cgi?id=58408

Redirect invalidates and scheduling into compositor when in
threaded compositing mode. Add stress tests for CCLayerTreeHost.

  • WebKit.gypi:
  • public/WebWidget.h:
  • src/WebPopupMenuImpl.cpp: (WebKit::WebPopupMenuImpl::animate):
  • src/WebPopupMenuImpl.h:
  • src/WebViewImpl.cpp: (WebKit::WebViewImpl::animate): (WebKit::WebViewImpl::paint): (WebKit::WebViewImpl::animateAndLayout): (WebKit::WebViewImpl::updateLayers): (WebKit::WebViewImpl::composite): (WebKit::WebViewImpl::setRootLayerNeedsDisplay): (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): (WebKit::WebViewImpl::doComposite): (WebKit::WebViewImpl::createLayerTreeHostContext3D): (WebKit::WebViewImpl::reallocateRenderer): (WebKit::WebViewImpl::updateLayerRendererSettings): (WebKit::WebViewImpl::updateLayerRendererViewport):
  • src/WebViewImpl.h:
  • tests/CCLayerTreeHostTest.cpp: Added. (WTF::CCLayerTreeHostTest::CCLayerTreeHostTest): (WTF::CCLayerTreeHostTest::animateAndLayout): (WTF::CCLayerTreeHostTest::beginCommitOnCCThread): (WTF::CCLayerTreeHostTest::beginCommitOnMainThread): (WTF::CCLayerTreeHostTest::commitOnCCThread): (WTF::CCLayerTreeHostTest::commitCompleteOnCCThread): (WTF::CCLayerTreeHostTest::commitCompleteOnMainThread): (WTF::CCLayerTreeHostTest::drawLayersAndPresentOnCCThread): (WTF::CCLayerTreeHostTest::updateLayers): (WTF::CCLayerTreeHostTest::onBeginTest): (WTF::CCLayerTreeHostTest::doEndTest): (WTF::CCLayerTreeHostTest::onEndTest): (WTF::CCLayerTreeHostTest::runTest): (WTF::CCLayerTreeHostTest::testTimeout): (WTF::MockLayerTreeHostClient::MockLayerTreeHostClient): (WTF::MockLayerTreeHostClient::createLayerTreeHostContext3D): (WTF::MockLayerTreeHostClient::animateAndLayout): (WTF::MockLayerTreeHostClient::updateLayers): (WTF::MockLayerTreeHostCommitter::create): (WTF::MockLayerTreeHostCommitter::commit): (WTF::MockLayerTreeHostCommitter::MockLayerTreeHostCommitter): (WTF::MockLayerTreeHostImpl::create): (WTF::MockLayerTreeHostImpl::beginCommit): (WTF::MockLayerTreeHostImpl::commitComplete): (WTF::MockLayerTreeHostImpl::drawLayersAndPresent): (WTF::MockLayerTreeHostImpl::MockLayerTreeHostImpl): (WTF::MockLayerTreeHostImplProxy::create): (WTF::MockLayerTreeHostImplProxy::createLayerTreeHostImpl): (WTF::MockLayerTreeHostImplProxy::MockLayerTreeHostImplProxy): (WTF::MockLayerTreeHost::MockLayerTreeHost): (WTF::MockLayerTreeHost::createLayerTreeHostImplProxy): (WTF::MockLayerTreeHost::updateLayers): (WTF::MockLayerTreeHost::createLayerTreeHostCommitter): (WTF::MockLayerTreeHost::beginCommit): (WTF::MockLayerTreeHost::commitComplete): (WTF::CCLayerTreeHostTest::doBeginTest): (WTF::CCLayerTreeHostTest::endTest): (WTF::CCLayerTreeHostTestShortlived1::CCLayerTreeHostTestShortlived1): (WTF::CCLayerTreeHostTestShortlived1::beginTest): (WTF::CCLayerTreeHostTestShortlived1::afterTest): (WTF::TEST_F): (WTF::CCLayerTreeHostTestShortlived2::CCLayerTreeHostTestShortlived2): (WTF::CCLayerTreeHostTestShortlived2::beginTest): (WTF::CCLayerTreeHostTestShortlived2::afterTest): (WTF::CCLayerTreeHostTestShortlived3::CCLayerTreeHostTestShortlived3): (WTF::CCLayerTreeHostTestShortlived3::beginTest): (WTF::CCLayerTreeHostTestShortlived3::afterTest): (WTF::CCLayerTreeHostTestCommitingWithContinuousRedraw::CCLayerTreeHostTestCommitingWithContinuousRedraw): (WTF::CCLayerTreeHostTestCommitingWithContinuousRedraw::beginTest): (WTF::CCLayerTreeHostTestCommitingWithContinuousRedraw::commitCompleteOnCCThread): (WTF::CCLayerTreeHostTestCommitingWithContinuousRedraw::drawLayersAndPresentOnCCThread): (WTF::CCLayerTreeHostTestCommitingWithContinuousRedraw::afterTest): (WTF::CCLayerTreeHostTestSetNeedsCommit1::CCLayerTreeHostTestSetNeedsCommit1): (WTF::CCLayerTreeHostTestSetNeedsCommit1::beginTest): (WTF::CCLayerTreeHostTestSetNeedsCommit1::drawLayersAndPresentOnCCThread): (WTF::CCLayerTreeHostTestSetNeedsCommit1::commitOnCCThread): (WTF::CCLayerTreeHostTestSetNeedsCommit1::afterTest): (WTF::CCLayerTreeHostTestSetNeedsCommit2::CCLayerTreeHostTestSetNeedsCommit2): (WTF::CCLayerTreeHostTestSetNeedsCommit2::beginTest): (WTF::CCLayerTreeHostTestSetNeedsCommit2::drawLayersAndPresentOnCCThread): (WTF::CCLayerTreeHostTestSetNeedsCommit2::commitOnCCThread): (WTF::CCLayerTreeHostTestSetNeedsCommit2::afterTest): (WTF::CCLayerTreeHostTestSetNeedsRedraw::CCLayerTreeHostTestSetNeedsRedraw): (WTF::CCLayerTreeHostTestSetNeedsRedraw::beginTest): (WTF::CCLayerTreeHostTestSetNeedsRedraw::drawLayersAndPresentOnCCThread): (WTF::CCLayerTreeHostTestSetNeedsRedraw::commitOnCCThread): (WTF::CCLayerTreeHostTestSetNeedsRedraw::afterTest):
  • tests/CCThreadTest.cpp: (WebCore::TEST):

2011-05-17 Nat Duca <nduca@chromium.org>

Reviewed by James Robinson.

[chromium] Implement CCLayerTreeHost and CCLayerTreeHostImpl portions of threaded compositor
https://bugs.webkit.org/show_bug.cgi?id=58408

  • DumpRenderTree/chromium/WebViewHost.cpp: (WebViewHost::paintInvalidatedRegion):
Location:
trunk
Files:
4 added
19 edited
5 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r89836 r89837  
     12011-05-17  Nat Duca  <nduca@chromium.org>
     2
     3        Reviewed by James Robinson.
     4
     5        [chromium] Implement CCLayerTreeHost and CCLayerTreeHostImpl portions of threaded compositor
     6        https://bugs.webkit.org/show_bug.cgi?id=58408
     7
     8        Create CCLayerTreeHost and CCLayerTreeHostImpl, which are the main
     9        thread and compositor thread halves of a composited view. Communication
     10        between the two is based on the design used in FileStreamProxy.
     11
     12        * WebCore.gypi:
     13        * platform/chromium/TraceEvent.h:
     14        * platform/graphics/chromium/LayerRendererChromium.cpp:
     15        (WebCore::LayerRendererChromium::create):
     16        (WebCore::LayerRendererChromium::LayerRendererChromium):
     17        (WebCore::LayerRendererChromium::setViewport):
     18        (WebCore::LayerRendererChromium::updateLayers):
     19        (WebCore::LayerRendererChromium::drawLayers):
     20        (WebCore::LayerRendererChromiumImpl::create):
     21        (WebCore::LayerRendererChromiumImpl::drawLayersAndPresent):
     22        (WebCore::LayerRendererChromiumImpl::LayerRendererChromiumImpl):
     23        (WebCore::LayerRendererChromiumImpl::drawLayersOnMainThread):
     24        (WebCore::LayerRendererChromiumImplProxy::create):
     25        (WebCore::LayerRendererChromiumImplProxy::createLayerTreeHostImpl):
     26        (WebCore::LayerRendererChromiumImplProxy::LayerRendererChromiumImplProxy):
     27        (WebCore::LayerRendererChromium::createLayerTreeHostImplProxy):
     28        * platform/graphics/chromium/LayerRendererChromium.h:
     29        * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
     30        (WebCore::CCHeadsUpDisplay::setShowFPSCounter):
     31        (WebCore::CCHeadsUpDisplay::setShowPlatformLayerTree):
     32        * platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
     33        (WebCore::CCHeadsUpDisplay::currentFrameNumber):
     34        * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp.
     35        (WebCore::CCLayerTreeHost::CCLayerTreeHost):
     36        (WebCore::CCLayerTreeHost::init):
     37        (WebCore::CCLayerTreeHost::~CCLayerTreeHost):
     38        (WebCore::CCLayerTreeHost::beginCommit):
     39        (WebCore::CCLayerTreeHost::commitComplete):
     40        (WebCore::CCLayerTreeHost::animateAndLayout):
     41        (WebCore::CCLayerTreeHost::createLayerTreeHostCommitter):
     42        (WebCore::CCLayerTreeHost::setNeedsCommitAndRedraw):
     43        (WebCore::CCLayerTreeHost::setNeedsRedraw):
     44        (WebCore::CCLayerTreeHost::updateLayers):
     45        * platform/graphics/chromium/cc/CCLayerTreeHost.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp.
     46        (WebCore::CCLayerTreeHost::frameNumber):
     47        * platform/graphics/chromium/cc/CCLayerTreeHostCommitter.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp.
     48        (WebCore::CCLayerTreeHostCommitter::create):
     49        (WebCore::CCLayerTreeHostCommitter::commit):
     50        * platform/graphics/chromium/cc/CCLayerTreeHostCommitter.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp.
     51        (WebCore::CCLayerTreeHostCommitter::CCLayerTreeHostCommitter):
     52        * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: Added.
     53        (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
     54        (WebCore::CCLayerTreeHostImpl::~CCLayerTreeHostImpl):
     55        (WebCore::CCLayerTreeHostImpl::beginCommit):
     56        (WebCore::CCLayerTreeHostImpl::commitComplete):
     57        (WebCore::CCLayerTreeHostImpl::drawLayers):
     58        (WebCore::CCLayerTreeHostImpl::setNeedsCommitAndRedraw):
     59        (WebCore::CCLayerTreeHostImpl::setNeedsRedraw):
     60        * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp.
     61        (WebCore::CCLayerTreeHostImplClient::~CCLayerTreeHostImplClient):
     62        (WebCore::CCLayerTreeHostImpl::frameNumber):
     63        (WebCore::CCLayerTreeHostImpl::sourceFrameNumber):
     64        (WebCore::CCLayerTreeHostImpl::setSourceFrameNumber):
     65        * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp: Added.
     66        (WebCore::CCLayerTreeHostImplProxy::CCLayerTreeHostImplProxy):
     67        (WebCore::CCLayerTreeHostImplProxy::start):
     68        (WebCore::CCLayerTreeHostImplProxy::~CCLayerTreeHostImplProxy):
     69        (WebCore::CCLayerTreeHostImplProxy::isStarted):
     70        (WebCore::CCLayerTreeHostImplProxy::setNeedsCommitAndRedraw):
     71        (WebCore::CCLayerTreeHostImplProxy::setNeedsRedraw):
     72        (WebCore::CCLayerTreeHostImplProxy::stop):
     73        (WebCore::CCLayerTreeHostImplProxy::postDrawLayersTaskOnCCThread):
     74        (WebCore::CCLayerTreeHostImplProxy::requestFrameAndCommitOnCCThread):
     75        (WebCore::CCLayerTreeHostImplProxy::isMainThread):
     76        (WebCore::CCLayerTreeHostImplProxy::isCCThread):
     77        (WebCore::CCLayerTreeHostImplProxy::requestFrameAndCommit):
     78        (WebCore::CCLayerTreeHostImplProxy::commitOnCCThread):
     79        (WebCore::CCLayerTreeHostImplProxy::drawLayersOnCCThread):
     80        (WebCore::CCLayerTreeHostImplProxy::setNeedsCommitAndRedrawOnCCThread):
     81        (WebCore::CCLayerTreeHostImplProxy::setNeedsRedrawOnCCThread):
     82        (WebCore::CCLayerTreeHostImplProxy::initImplOnCCThread):
     83        (WebCore::CCLayerTreeHostImplProxy::layerTreeHostClosedOnCCThread):
     84        * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h: Added.
     85        (WebCore::CCLayerTreeHostImplProxy::host):
     86        * platform/graphics/chromium/cc/CCMainThreadTask.h:
     87        * platform/graphics/chromium/cc/CCThread.cpp:
     88        (WebCore::CCThread::runLoop):
     89        * platform/graphics/chromium/cc/CCThreadTask.h:
     90
    1912011-06-27  Abhishek Arya  <inferno@chromium.org>
    292
  • trunk/Source/WebCore/WebCore.gypi

    r89833 r89837  
    41664166            'platform/graphics/chromium/cc/CCLayerSorter.cpp',
    41674167            'platform/graphics/chromium/cc/CCLayerSorter.h',
     4168            'platform/graphics/chromium/cc/CCLayerTreeHost.cpp',
     4169            'platform/graphics/chromium/cc/CCLayerTreeHost.h',
     4170            'platform/graphics/chromium/cc/CCLayerTreeHostCommitter.cpp',
     4171            'platform/graphics/chromium/cc/CCLayerTreeHostCommitter.h',
     4172            'platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp',
     4173            'platform/graphics/chromium/cc/CCLayerTreeHostImpl.h',
     4174            'platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp',
     4175            'platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h',
    41684176            'platform/graphics/chromium/cc/CCMainThread.cpp',
    41694177            'platform/graphics/chromium/cc/CCMainThread.h',
  • trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp

    r89700 r89837  
    5151#include "WebGLLayerChromium.h"
    5252#include "cc/CCLayerImpl.h"
     53#include "cc/CCLayerTreeHostImpl.h"
     54#include "cc/CCMainThreadTask.h"
    5355#if USE(SKIA)
    5456#include "Extensions3D.h"
     
    99101}
    100102
    101 PassRefPtr<LayerRendererChromium> LayerRendererChromium::create(PassRefPtr<GraphicsContext3D> context, PassOwnPtr<LayerPainterChromium> contentPaint, bool accelerateDrawing)
    102 {
     103PassRefPtr<LayerRendererChromium> LayerRendererChromium::create(CCLayerTreeHostClient* client, PassOwnPtr<LayerPainterChromium> contentPaint, bool accelerateDrawing)
     104{
     105    RefPtr<GraphicsContext3D> context = client->createLayerTreeHostContext3D();
    103106    if (!context)
    104107        return 0;
    105108
    106     RefPtr<LayerRendererChromium> layerRenderer(adoptRef(new LayerRendererChromium(context, contentPaint, accelerateDrawing)));
     109    RefPtr<LayerRendererChromium> layerRenderer(adoptRef(new LayerRendererChromium(client, context, contentPaint, accelerateDrawing)));
     110    layerRenderer->init();
    107111    if (!layerRenderer->hardwareCompositing())
    108112        return 0;
     
    111115}
    112116
    113 LayerRendererChromium::LayerRendererChromium(PassRefPtr<GraphicsContext3D> context,
     117LayerRendererChromium::LayerRendererChromium(CCLayerTreeHostClient* client,
     118                                             PassRefPtr<GraphicsContext3D> context,
    114119                                             PassOwnPtr<LayerPainterChromium> contentPaint,
    115120                                             bool accelerateDrawing)
    116     : m_viewportScrollPosition(IntPoint(-1, -1))
     121    : CCLayerTreeHost(client)
     122    , m_viewportScrollPosition(IntPoint(-1, -1))
    117123    , m_rootLayer(0)
    118124    , m_accelerateDrawing(false)
     
    224230        m_rootLayerContentTiler->invalidateEntireLayer();
    225231    }
    226 }
    227 
    228 void LayerRendererChromium::updateAndDrawLayers()
    229 {
     232    setNeedsCommitAndRedraw();
     233}
     234
     235void LayerRendererChromium::updateLayers()
     236{
     237    CCLayerTreeHost::updateLayers();
    230238    if (m_viewportVisibleRect.isEmpty())
    231239        return;
     
    252260    }
    253261
    254     LayerList renderSurfaceLayerList;
    255     updateLayers(renderSurfaceLayerList);
    256 
     262    m_computedRenderSurfaceLayerList = adoptPtr(new LayerList());
     263    updateLayers(*m_computedRenderSurfaceLayerList);
     264}
     265
     266void LayerRendererChromium::drawLayers()
     267{
     268    ASSERT(m_hardwareCompositing);
     269    ASSERT(m_computedRenderSurfaceLayerList);
    257270    // Before drawLayers:
    258271    if (hardwareCompositing() && m_contextSupportsLatch) {
     
    277290    }
    278291
    279     drawLayers(renderSurfaceLayerList);
     292    drawLayers(*m_computedRenderSurfaceLayerList);
    280293
    281294    m_textureManager->unprotectAllTextures();
     
    12661279}
    12671280
     1281class LayerRendererChromiumImpl : public CCLayerTreeHostImpl {
     1282public:
     1283    static PassOwnPtr<LayerRendererChromiumImpl> create(CCLayerTreeHostImplClient* client, LayerRendererChromium* layerRenderer)
     1284    {
     1285        return adoptPtr(new LayerRendererChromiumImpl(client, layerRenderer));
     1286    }
     1287
     1288    virtual void drawLayersAndPresent()
     1289    {
     1290        CCCompletionEvent completion;
     1291        bool contextLost;
     1292        CCMainThread::postTask(createMainThreadTask(this, &LayerRendererChromiumImpl::drawLayersOnMainThread, AllowCrossThreadAccess(&completion), AllowCrossThreadAccess(&contextLost)));
     1293        completion.wait();
     1294
     1295        // FIXME: Send the "UpdateRect" message up to the RenderWidget [or moveplugin equivalents...]
     1296
     1297        // FIXME: handle context lost
     1298        if (contextLost)
     1299            FATAL("LayerRendererChromiumImpl does not handle context lost yet.");
     1300    }
     1301
     1302private:
     1303    LayerRendererChromiumImpl(CCLayerTreeHostImplClient* client, LayerRendererChromium* layerRenderer)
     1304        : CCLayerTreeHostImpl(client)
     1305        , m_layerRenderer(layerRenderer) { }
     1306
     1307    void drawLayersOnMainThread(CCCompletionEvent* completion, bool* contextLost)
     1308    {
     1309        ASSERT(isMainThread());
     1310
     1311        if (m_layerRenderer->rootLayer()) {
     1312            m_layerRenderer->drawLayers();
     1313            m_layerRenderer->present();
     1314
     1315            GraphicsContext3D* context = m_layerRenderer->context();
     1316            *contextLost = context->getExtensions()->getGraphicsResetStatusARB() != GraphicsContext3D::NO_ERROR;
     1317        } else
     1318            *contextLost = false;
     1319        completion->signal();
     1320    }
     1321
     1322    LayerRendererChromium* m_layerRenderer;
     1323};
     1324
     1325class LayerRendererChromiumImplProxy : public CCLayerTreeHostImplProxy {
     1326public:
     1327    static PassOwnPtr<LayerRendererChromiumImplProxy> create(LayerRendererChromium* layerRenderer)
     1328    {
     1329        return adoptPtr(new LayerRendererChromiumImplProxy(layerRenderer));
     1330    }
     1331
     1332    virtual PassOwnPtr<CCLayerTreeHostImpl> createLayerTreeHostImpl()
     1333    {
     1334        return LayerRendererChromiumImpl::create(this, static_cast<LayerRendererChromium*>(host()));
     1335    }
     1336
     1337private:
     1338    LayerRendererChromiumImplProxy(LayerRendererChromium* layerRenderer)
     1339        : CCLayerTreeHostImplProxy(layerRenderer) { }
     1340};
     1341
     1342PassOwnPtr<CCLayerTreeHostImplProxy> LayerRendererChromium::createLayerTreeHostImplProxy()
     1343{
     1344    OwnPtr<CCLayerTreeHostImplProxy> proxy = LayerRendererChromiumImplProxy::create(this);
     1345    proxy->start();
     1346    return proxy.release();
     1347}
     1348
    12681349} // namespace WebCore
    12691350
  • trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h

    r89700 r89837  
    4545#include "cc/CCHeadsUpDisplay.h"
    4646#include "cc/CCLayerSorter.h"
     47#include "cc/CCLayerTreeHost.h"
    4748#include "cc/CCPluginLayerImpl.h"
    4849#include "cc/CCVideoLayerImpl.h"
     
    5152#include <wtf/PassOwnPtr.h>
    5253#include <wtf/PassRefPtr.h>
    53 #include <wtf/RefCounted.h>
    5454#include <wtf/Vector.h>
    5555
     
    6767class CCHeadsUpDisplay;
    6868class CCLayerImpl;
     69class CCLayerTreeHostCommitter;
     70class CCLayerTreeHostImpl;
    6971class GeometryBinding;
    7072class GraphicsContext3D;
     
    7274
    7375// Class that handles drawing of composited render layers using GL.
    74 class LayerRendererChromium : public RefCounted<LayerRendererChromium> {
     76class LayerRendererChromium : public CCLayerTreeHost {
    7577public:
    76     static PassRefPtr<LayerRendererChromium> create(PassRefPtr<GraphicsContext3D>, PassOwnPtr<LayerPainterChromium> contentPaint, bool accelerateDrawing);
     78    static PassRefPtr<LayerRendererChromium> create(CCLayerTreeHostClient*, PassOwnPtr<LayerPainterChromium> contentPaint, bool accelerateDrawing);
    7779
    7880    ~LayerRendererChromium();
     
    8991
    9092    // updates and draws the current layers onto the backbuffer
    91     void updateAndDrawLayers();
     93    virtual void updateLayers();
     94    void drawLayers();
    9295
    9396    // Set by WebViewImpl when animation callbacks are running.
     
    157160    static bool s_inPaintLayerContents;
    158161#endif
     162protected:
     163    virtual PassOwnPtr<CCLayerTreeHostImplProxy> createLayerTreeHostImplProxy();
     164
    159165private:
    160166    typedef Vector<RefPtr<CCLayerImpl> > LayerList;
    161167    typedef HashMap<GraphicsContext3D*, int> ChildContextMap;
    162168
    163     // FIXME: This needs to be moved to the CCViewImpl when that class exists.
     169    // FIXME: This needs to be moved to the CCLayerTreeHostImpl when that class exists.
    164170    RefPtr<CCLayerImpl> m_rootCCLayerImpl;
    165171
    166     LayerRendererChromium(PassRefPtr<GraphicsContext3D>, PassOwnPtr<LayerPainterChromium> contentPaint, bool accelerateDrawing);
     172    LayerRendererChromium(CCLayerTreeHostClient*, PassRefPtr<GraphicsContext3D>, PassOwnPtr<LayerPainterChromium> contentPaint, bool accelerateDrawing);
    167173
    168174    void updateLayers(LayerList& renderSurfaceLayerList);
     
    210216    bool m_hardwareCompositing;
    211217    bool m_accelerateDrawing;
     218
     219    OwnPtr<LayerList> m_computedRenderSurfaceLayerList;
    212220
    213221    RenderSurfaceChromium* m_currentRenderSurface;
  • trunk/Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp

    r89700 r89837  
    248248}
    249249
     250void CCHeadsUpDisplay::setShowFPSCounter(bool show)
     251{
     252    m_showFPSCounter = show;
     253    m_layerRenderer->setNeedsRedraw();
     254}
     255
     256void CCHeadsUpDisplay::setShowPlatformLayerTree(bool show)
     257{
     258    m_showPlatformLayerTree = show;
     259    m_layerRenderer->setNeedsRedraw();
     260}
     261
    250262}
    251263
  • trunk/Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.h

    r89700 r89837  
    5050    ~CCHeadsUpDisplay();
    5151
     52    int currentFrameNumber() const { return m_currentFrameNumber; }
     53
    5254    void onFrameBegin(double timestamp);
    5355    void onPresent();
    5456
    55     void setShowFPSCounter(bool enable) { m_showFPSCounter = enable; }
     57    void setShowFPSCounter(bool enable);
    5658    bool showFPSCounter() const { return m_showFPSCounter; }
    5759
    58     void setShowPlatformLayerTree(bool enable) { m_showPlatformLayerTree = enable; }
     60    void setShowPlatformLayerTree(bool enable);
    5961    bool showPlatformLayerTree() const { return m_showPlatformLayerTree; }
    6062
  • trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp

    r89836 r89837  
    2525#include "config.h"
    2626
    27 #include "CCThread.h"
     27#include "cc/CCLayerTreeHost.h"
    2828
    29 #include "LayerRendererChromium.h"
    30 #include <wtf/CurrentTime.h>
    31 #include <wtf/PassOwnPtr.h>
    32 #include <wtf/ThreadingPrimitives.h>
     29#include "TraceEvent.h"
     30#include "cc/CCLayerTreeHostCommitter.h"
     31#include "cc/CCLayerTreeHostImpl.h"
     32
    3333
    3434namespace WebCore {
    3535
    36 using namespace WTF;
    37 
    38 CCThread::CCThread()
     36CCLayerTreeHost::CCLayerTreeHost(CCLayerTreeHostClient* client)
     37    : m_client(client)
     38    , m_frameNumber(0)
    3939{
    40     MutexLocker lock(m_threadCreationMutex);
    41     m_threadID = createThread(CCThread::compositorThreadStart, this, "Chromium Compositor");
    4240}
    4341
    44 CCThread::~CCThread()
     42void CCLayerTreeHost::init()
    4543{
    46     m_queue.kill();
    47 
    48     // Stop thread.
    49     void* exitCode;
    50     waitForThreadCompletion(m_threadID, &exitCode);
    51     m_threadID = 0;
     44#if USE(THREADED_COMPOSITING)
     45    m_proxy = createLayerTreeHostImplProxy();
     46    ASSERT(m_proxy->isStarted());
     47    m_proxy->setNeedsCommitAndRedraw();
     48#endif
    5249}
    5350
    54 void CCThread::postTask(PassOwnPtr<Task> task)
     51CCLayerTreeHost::~CCLayerTreeHost()
    5552{
    56     m_queue.append(task);
     53    TRACE_EVENT("CCLayerTreeHost::~CCLayerTreeHost", this, 0);
     54#if USE(THREADED_COMPOSITING)
     55    m_proxy->stop();
     56    m_proxy.clear();
     57#endif
    5758}
    5859
    59 void* CCThread::compositorThreadStart(void* userdata)
     60void CCLayerTreeHost::beginCommit()
    6061{
    61     CCThread* ccThread = static_cast<CCThread*>(userdata);
    62     return ccThread->runLoop();
    6362}
    6463
    65 void* CCThread::runLoop()
     64void CCLayerTreeHost::commitComplete()
    6665{
    67     {
    68         // Wait for CCThread::start() to complete to have m_threadID
    69         // established before starting the main loop.
    70         MutexLocker lock(m_threadCreationMutex);
    71     }
     66    m_frameNumber++;
     67}
    7268
    73     while (OwnPtr<Task> task = m_queue.waitForMessage())
    74         task->performTask();
     69void CCLayerTreeHost::animateAndLayout(double frameBeginTime)
     70{
     71    m_client->animateAndLayout(frameBeginTime);
     72}
    7573
    76     return 0;
     74PassOwnPtr<CCLayerTreeHostCommitter> CCLayerTreeHost::createLayerTreeHostCommitter()
     75{
     76    return CCLayerTreeHostCommitter::create();
     77}
     78
     79void CCLayerTreeHost::setNeedsCommitAndRedraw()
     80{
     81#if USE(THREADED_COMPOSITING)
     82    m_proxy->setNeedsCommitAndRedraw();
     83#endif
     84}
     85
     86void CCLayerTreeHost::setNeedsRedraw()
     87{
     88    TRACE_EVENT("CCLayerTreeHost::setNeedsRedraw", this, 0);
     89#if USE(THREADED_COMPOSITING)
     90    m_proxy->setNeedsRedraw();
     91#endif
     92}
     93
     94void CCLayerTreeHost::updateLayers()
     95{
     96    m_client->updateLayers();
    7797}
    7898
  • trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h

    r89836 r89837  
    2323 */
    2424
    25 #include "config.h"
     25#ifndef CCLayerTreeHost_h
     26#define CCLayerTreeHost_h
    2627
    27 #include "CCThread.h"
    28 
    29 #include "LayerRendererChromium.h"
    30 #include <wtf/CurrentTime.h>
     28#include "cc/CCLayerTreeHostCommitter.h"
     29#include "cc/CCLayerTreeHostImplProxy.h"
    3130#include <wtf/PassOwnPtr.h>
    32 #include <wtf/ThreadingPrimitives.h>
     31#include <wtf/PassRefPtr.h>
     32#include <wtf/RefCounted.h>
    3333
    3434namespace WebCore {
    3535
    36 using namespace WTF;
     36class CCLayerTreeHostImpl;
     37class CCLayerTreeHostImplClient;
     38class GraphicsContext3D;
    3739
    38 CCThread::CCThread()
    39 {
    40     MutexLocker lock(m_threadCreationMutex);
    41     m_threadID = createThread(CCThread::compositorThreadStart, this, "Chromium Compositor");
     40class CCLayerTreeHostClient {
     41public:
     42    virtual void animateAndLayout(double frameBeginTime) = 0;
     43    virtual PassRefPtr<GraphicsContext3D> createLayerTreeHostContext3D() = 0;
     44    virtual void updateLayers() = 0;
     45
     46protected:
     47    virtual ~CCLayerTreeHostClient() { }
     48};
     49
     50class CCLayerTreeHost : public RefCounted<CCLayerTreeHost> {
     51public:
     52    explicit CCLayerTreeHost(CCLayerTreeHostClient*);
     53    void init();
     54    virtual ~CCLayerTreeHost();
     55
     56    virtual void animateAndLayout(double frameBeginTime);
     57    virtual void beginCommit();
     58    virtual void commitComplete();
     59    virtual PassOwnPtr<CCLayerTreeHostCommitter> createLayerTreeHostCommitter();
     60
     61    int frameNumber() const { return m_frameNumber; }
     62
     63    void setNeedsCommitAndRedraw();
     64    void setNeedsRedraw();
     65
     66    virtual void updateLayers();
     67
     68protected:
     69    virtual PassOwnPtr<CCLayerTreeHostImplProxy> createLayerTreeHostImplProxy() = 0;
     70
     71private:
     72    CCLayerTreeHostClient* m_client;
     73    int m_frameNumber;
     74    OwnPtr<CCLayerTreeHostImplProxy> m_proxy;
     75};
     76
    4277}
    4378
    44 CCThread::~CCThread()
    45 {
    46     m_queue.kill();
    47 
    48     // Stop thread.
    49     void* exitCode;
    50     waitForThreadCompletion(m_threadID, &exitCode);
    51     m_threadID = 0;
    52 }
    53 
    54 void CCThread::postTask(PassOwnPtr<Task> task)
    55 {
    56     m_queue.append(task);
    57 }
    58 
    59 void* CCThread::compositorThreadStart(void* userdata)
    60 {
    61     CCThread* ccThread = static_cast<CCThread*>(userdata);
    62     return ccThread->runLoop();
    63 }
    64 
    65 void* CCThread::runLoop()
    66 {
    67     {
    68         // Wait for CCThread::start() to complete to have m_threadID
    69         // established before starting the main loop.
    70         MutexLocker lock(m_threadCreationMutex);
    71     }
    72 
    73     while (OwnPtr<Task> task = m_queue.waitForMessage())
    74         task->performTask();
    75 
    76     return 0;
    77 }
    78 
    79 }
     79#endif
  • trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommitter.cpp

    r89836 r89837  
    2525#include "config.h"
    2626
    27 #include "CCThread.h"
     27#include "cc/CCLayerTreeHostCommitter.h"
    2828
    29 #include "LayerRendererChromium.h"
    30 #include <wtf/CurrentTime.h>
    31 #include <wtf/PassOwnPtr.h>
    32 #include <wtf/ThreadingPrimitives.h>
     29#include "cc/CCLayerTreeHost.h"
     30#include "cc/CCLayerTreeHostImpl.h"
    3331
    3432namespace WebCore {
    3533
    36 using namespace WTF;
    37 
    38 CCThread::CCThread()
     34PassOwnPtr<CCLayerTreeHostCommitter> CCLayerTreeHostCommitter::create()
    3935{
    40     MutexLocker lock(m_threadCreationMutex);
    41     m_threadID = createThread(CCThread::compositorThreadStart, this, "Chromium Compositor");
     36    return adoptPtr(new CCLayerTreeHostCommitter());
    4237}
    4338
    44 CCThread::~CCThread()
     39void CCLayerTreeHostCommitter::commit(CCLayerTreeHost* host, CCLayerTreeHostImpl* hostImpl)
    4540{
    46     m_queue.kill();
    47 
    48     // Stop thread.
    49     void* exitCode;
    50     waitForThreadCompletion(m_threadID, &exitCode);
    51     m_threadID = 0;
    52 }
    53 
    54 void CCThread::postTask(PassOwnPtr<Task> task)
    55 {
    56     m_queue.append(task);
    57 }
    58 
    59 void* CCThread::compositorThreadStart(void* userdata)
    60 {
    61     CCThread* ccThread = static_cast<CCThread*>(userdata);
    62     return ccThread->runLoop();
    63 }
    64 
    65 void* CCThread::runLoop()
    66 {
    67     {
    68         // Wait for CCThread::start() to complete to have m_threadID
    69         // established before starting the main loop.
    70         MutexLocker lock(m_threadCreationMutex);
    71     }
    72 
    73     while (OwnPtr<Task> task = m_queue.waitForMessage())
    74         task->performTask();
    75 
    76     return 0;
     41    hostImpl->setSourceFrameNumber(host->frameNumber());
    7742}
    7843
  • trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommitter.h

    r89836 r89837  
    2323 */
    2424
    25 #include "config.h"
     25#ifndef CCLayerTreeHostCommitter_h
     26#define CCLayerTreeHostCommitter_h
    2627
    27 #include "CCThread.h"
    28 
    29 #include "LayerRendererChromium.h"
    30 #include <wtf/CurrentTime.h>
     28#include <wtf/Noncopyable.h>
    3129#include <wtf/PassOwnPtr.h>
    32 #include <wtf/ThreadingPrimitives.h>
    3330
    3431namespace WebCore {
    3532
    36 using namespace WTF;
     33class CCLayerTreeHost;
     34class CCLayerTreeHostImpl;
    3735
    38 CCThread::CCThread()
    39 {
    40     MutexLocker lock(m_threadCreationMutex);
    41     m_threadID = createThread(CCThread::compositorThreadStart, this, "Chromium Compositor");
     36// FIXME: merge in TreeSynchronizer code into here
     37class CCLayerTreeHostCommitter {
     38    WTF_MAKE_NONCOPYABLE(CCLayerTreeHostCommitter);
     39public:
     40    static PassOwnPtr<CCLayerTreeHostCommitter> create();
     41    virtual ~CCLayerTreeHostCommitter() { }
     42
     43    virtual void commit(CCLayerTreeHost*, CCLayerTreeHostImpl*);
     44
     45protected:
     46    CCLayerTreeHostCommitter() { }
     47};
     48
    4249}
    4350
    44 CCThread::~CCThread()
    45 {
    46     m_queue.kill();
    47 
    48     // Stop thread.
    49     void* exitCode;
    50     waitForThreadCompletion(m_threadID, &exitCode);
    51     m_threadID = 0;
    52 }
    53 
    54 void CCThread::postTask(PassOwnPtr<Task> task)
    55 {
    56     m_queue.append(task);
    57 }
    58 
    59 void* CCThread::compositorThreadStart(void* userdata)
    60 {
    61     CCThread* ccThread = static_cast<CCThread*>(userdata);
    62     return ccThread->runLoop();
    63 }
    64 
    65 void* CCThread::runLoop()
    66 {
    67     {
    68         // Wait for CCThread::start() to complete to have m_threadID
    69         // established before starting the main loop.
    70         MutexLocker lock(m_threadCreationMutex);
    71     }
    72 
    73     while (OwnPtr<Task> task = m_queue.waitForMessage())
    74         task->performTask();
    75 
    76     return 0;
    77 }
    78 
    79 }
     51#endif
  • trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h

    r89836 r89837  
    2323 */
    2424
    25 #include "config.h"
     25#ifndef CCLayerTreeHostImpl_h
     26#define CCLayerTreeHostImpl_h
    2627
    27 #include "CCThread.h"
    28 
    29 #include "LayerRendererChromium.h"
    30 #include <wtf/CurrentTime.h>
    31 #include <wtf/PassOwnPtr.h>
    32 #include <wtf/ThreadingPrimitives.h>
     28#include "cc/CCThread.h"
     29#include <wtf/RefPtr.h>
     30#include <wtf/ThreadSafeRefCounted.h>
    3331
    3432namespace WebCore {
    3533
    36 using namespace WTF;
     34// Provides scheduling infrastructure for a CCLayerTreeHostImpl
     35class CCLayerTreeHostImplClient  {
     36public:
     37    virtual void postDrawLayersTaskOnCCThread() = 0;
     38    virtual void requestFrameAndCommitOnCCThread(double frameBeginTime) = 0;
    3739
    38 CCThread::CCThread()
    39 {
    40     MutexLocker lock(m_threadCreationMutex);
    41     m_threadID = createThread(CCThread::compositorThreadStart, this, "Chromium Compositor");
    42 }
     40protected:
     41    virtual ~CCLayerTreeHostImplClient() { }
     42};
    4343
    44 CCThread::~CCThread()
    45 {
    46     m_queue.kill();
     44// CCLayerTreeHostImpl owns the CCLayerImpl tree as well as associated rendering state
     45class CCLayerTreeHostImpl {
     46    WTF_MAKE_NONCOPYABLE(CCLayerTreeHostImpl);
     47public:
     48    explicit CCLayerTreeHostImpl(CCLayerTreeHostImplClient*);
     49    virtual ~CCLayerTreeHostImpl();
    4750
    48     // Stop thread.
    49     void* exitCode;
    50     waitForThreadCompletion(m_threadID, &exitCode);
    51     m_threadID = 0;
    52 }
     51    virtual void beginCommit();
     52    virtual void commitComplete();
    5353
    54 void CCThread::postTask(PassOwnPtr<Task> task)
    55 {
    56     m_queue.append(task);
    57 }
     54    void drawLayers();
     55    virtual void drawLayersAndPresent() = 0;
    5856
    59 void* CCThread::compositorThreadStart(void* userdata)
    60 {
    61     CCThread* ccThread = static_cast<CCThread*>(userdata);
    62     return ccThread->runLoop();
    63 }
     57    int frameNumber() const { return m_frameNumber; }
    6458
    65 void* CCThread::runLoop()
    66 {
    67     {
    68         // Wait for CCThread::start() to complete to have m_threadID
    69         // established before starting the main loop.
    70         MutexLocker lock(m_threadCreationMutex);
    71     }
     59    void setNeedsRedraw();
     60    void setNeedsCommitAndRedraw();
    7261
    73     while (OwnPtr<Task> task = m_queue.waitForMessage())
    74         task->performTask();
     62    int sourceFrameNumber() const { return m_sourceFrameNumber; }
     63    void setSourceFrameNumber(int frameNumber) { m_sourceFrameNumber = frameNumber; }
    7564
    76     return 0;
    77 }
     65protected:
     66    int m_sourceFrameNumber;
     67    int m_frameNumber;
    7868
    79 }
     69private:
     70    CCLayerTreeHostImplClient* m_client;
     71    bool m_commitPending;
     72    bool m_redrawPending;
     73};
     74
     75};
     76
     77#endif
  • trunk/Source/WebCore/platform/graphics/chromium/cc/CCMainThreadTask.h

    r89700 r89837  
    2525#define CCMainThreadTask_h
    2626
    27 #include "CCMainThread.h"
    2827#include "CrossThreadCopier.h"
    2928#include "CrossThreadTask.h"
     29#include "cc/CCMainThread.h"
    3030#include <wtf/PassOwnPtr.h>
    3131#include <wtf/PassRefPtr.h>
  • trunk/Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp

    r89700 r89837  
    2828
    2929#include "LayerRendererChromium.h"
     30#include "TraceEvent.h"
    3031#include <wtf/CurrentTime.h>
    3132#include <wtf/PassOwnPtr.h>
     
    6566void* CCThread::runLoop()
    6667{
     68    TRACE_EVENT("CCThread::runLoop", this, 0);
    6769    {
    6870        // Wait for CCThread::start() to complete to have m_threadID
  • trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadTask.h

    r89700 r89837  
    2525#define CCThreadTask_h
    2626
    27 #include "CCThread.h"
    2827#include "CrossThreadCopier.h"
    2928#include "CrossThreadTask.h"
     29#include "cc/CCThread.h"
    3030#include <wtf/PassOwnPtr.h>
    3131#include <wtf/PassRefPtr.h>
  • trunk/Source/WebKit/chromium/ChangeLog

    r89792 r89837  
     12011-05-17  Nat Duca  <nduca@chromium.org>
     2
     3        Reviewed by James Robinson.
     4
     5        [chromium] Implement CCLayerTreeHost and CCLayerTreeHostImpl portions of threaded compositor
     6        https://bugs.webkit.org/show_bug.cgi?id=58408
     7
     8        Redirect invalidates and scheduling into compositor when in
     9        threaded compositing mode. Add stress tests for CCLayerTreeHost.
     10
     11        * WebKit.gypi:
     12        * public/WebWidget.h:
     13        * src/WebPopupMenuImpl.cpp:
     14        (WebKit::WebPopupMenuImpl::animate):
     15        * src/WebPopupMenuImpl.h:
     16        * src/WebViewImpl.cpp:
     17        (WebKit::WebViewImpl::animate):
     18        (WebKit::WebViewImpl::paint):
     19        (WebKit::WebViewImpl::animateAndLayout):
     20        (WebKit::WebViewImpl::updateLayers):
     21        (WebKit::WebViewImpl::composite):
     22        (WebKit::WebViewImpl::setRootLayerNeedsDisplay):
     23        (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
     24        (WebKit::WebViewImpl::doComposite):
     25        (WebKit::WebViewImpl::createLayerTreeHostContext3D):
     26        (WebKit::WebViewImpl::reallocateRenderer):
     27        (WebKit::WebViewImpl::updateLayerRendererSettings):
     28        (WebKit::WebViewImpl::updateLayerRendererViewport):
     29        * src/WebViewImpl.h:
     30        * tests/CCLayerTreeHostTest.cpp: Added.
     31        (WTF::CCLayerTreeHostTest::CCLayerTreeHostTest):
     32        (WTF::CCLayerTreeHostTest::animateAndLayout):
     33        (WTF::CCLayerTreeHostTest::beginCommitOnCCThread):
     34        (WTF::CCLayerTreeHostTest::beginCommitOnMainThread):
     35        (WTF::CCLayerTreeHostTest::commitOnCCThread):
     36        (WTF::CCLayerTreeHostTest::commitCompleteOnCCThread):
     37        (WTF::CCLayerTreeHostTest::commitCompleteOnMainThread):
     38        (WTF::CCLayerTreeHostTest::drawLayersAndPresentOnCCThread):
     39        (WTF::CCLayerTreeHostTest::updateLayers):
     40        (WTF::CCLayerTreeHostTest::onBeginTest):
     41        (WTF::CCLayerTreeHostTest::doEndTest):
     42        (WTF::CCLayerTreeHostTest::onEndTest):
     43        (WTF::CCLayerTreeHostTest::runTest):
     44        (WTF::CCLayerTreeHostTest::testTimeout):
     45        (WTF::MockLayerTreeHostClient::MockLayerTreeHostClient):
     46        (WTF::MockLayerTreeHostClient::createLayerTreeHostContext3D):
     47        (WTF::MockLayerTreeHostClient::animateAndLayout):
     48        (WTF::MockLayerTreeHostClient::updateLayers):
     49        (WTF::MockLayerTreeHostCommitter::create):
     50        (WTF::MockLayerTreeHostCommitter::commit):
     51        (WTF::MockLayerTreeHostCommitter::MockLayerTreeHostCommitter):
     52        (WTF::MockLayerTreeHostImpl::create):
     53        (WTF::MockLayerTreeHostImpl::beginCommit):
     54        (WTF::MockLayerTreeHostImpl::commitComplete):
     55        (WTF::MockLayerTreeHostImpl::drawLayersAndPresent):
     56        (WTF::MockLayerTreeHostImpl::MockLayerTreeHostImpl):
     57        (WTF::MockLayerTreeHostImplProxy::create):
     58        (WTF::MockLayerTreeHostImplProxy::createLayerTreeHostImpl):
     59        (WTF::MockLayerTreeHostImplProxy::MockLayerTreeHostImplProxy):
     60        (WTF::MockLayerTreeHost::MockLayerTreeHost):
     61        (WTF::MockLayerTreeHost::createLayerTreeHostImplProxy):
     62        (WTF::MockLayerTreeHost::updateLayers):
     63        (WTF::MockLayerTreeHost::createLayerTreeHostCommitter):
     64        (WTF::MockLayerTreeHost::beginCommit):
     65        (WTF::MockLayerTreeHost::commitComplete):
     66        (WTF::CCLayerTreeHostTest::doBeginTest):
     67        (WTF::CCLayerTreeHostTest::endTest):
     68        (WTF::CCLayerTreeHostTestShortlived1::CCLayerTreeHostTestShortlived1):
     69        (WTF::CCLayerTreeHostTestShortlived1::beginTest):
     70        (WTF::CCLayerTreeHostTestShortlived1::afterTest):
     71        (WTF::TEST_F):
     72        (WTF::CCLayerTreeHostTestShortlived2::CCLayerTreeHostTestShortlived2):
     73        (WTF::CCLayerTreeHostTestShortlived2::beginTest):
     74        (WTF::CCLayerTreeHostTestShortlived2::afterTest):
     75        (WTF::CCLayerTreeHostTestShortlived3::CCLayerTreeHostTestShortlived3):
     76        (WTF::CCLayerTreeHostTestShortlived3::beginTest):
     77        (WTF::CCLayerTreeHostTestShortlived3::afterTest):
     78        (WTF::CCLayerTreeHostTestCommitingWithContinuousRedraw::CCLayerTreeHostTestCommitingWithContinuousRedraw):
     79        (WTF::CCLayerTreeHostTestCommitingWithContinuousRedraw::beginTest):
     80        (WTF::CCLayerTreeHostTestCommitingWithContinuousRedraw::commitCompleteOnCCThread):
     81        (WTF::CCLayerTreeHostTestCommitingWithContinuousRedraw::drawLayersAndPresentOnCCThread):
     82        (WTF::CCLayerTreeHostTestCommitingWithContinuousRedraw::afterTest):
     83        (WTF::CCLayerTreeHostTestSetNeedsCommit1::CCLayerTreeHostTestSetNeedsCommit1):
     84        (WTF::CCLayerTreeHostTestSetNeedsCommit1::beginTest):
     85        (WTF::CCLayerTreeHostTestSetNeedsCommit1::drawLayersAndPresentOnCCThread):
     86        (WTF::CCLayerTreeHostTestSetNeedsCommit1::commitOnCCThread):
     87        (WTF::CCLayerTreeHostTestSetNeedsCommit1::afterTest):
     88        (WTF::CCLayerTreeHostTestSetNeedsCommit2::CCLayerTreeHostTestSetNeedsCommit2):
     89        (WTF::CCLayerTreeHostTestSetNeedsCommit2::beginTest):
     90        (WTF::CCLayerTreeHostTestSetNeedsCommit2::drawLayersAndPresentOnCCThread):
     91        (WTF::CCLayerTreeHostTestSetNeedsCommit2::commitOnCCThread):
     92        (WTF::CCLayerTreeHostTestSetNeedsCommit2::afterTest):
     93        (WTF::CCLayerTreeHostTestSetNeedsRedraw::CCLayerTreeHostTestSetNeedsRedraw):
     94        (WTF::CCLayerTreeHostTestSetNeedsRedraw::beginTest):
     95        (WTF::CCLayerTreeHostTestSetNeedsRedraw::drawLayersAndPresentOnCCThread):
     96        (WTF::CCLayerTreeHostTestSetNeedsRedraw::commitOnCCThread):
     97        (WTF::CCLayerTreeHostTestSetNeedsRedraw::afterTest):
     98        * tests/CCThreadTest.cpp:
     99        (WebCore::TEST):
     100
    11012011-06-27  Yuta Kitamura  <yutak@chromium.org>
    2102
  • trunk/Source/WebKit/chromium/WebKit.gypi

    r89700 r89837  
    5555            'tests/ArenaTestHelpers.h',
    5656            'tests/AssociatedURLLoaderTest.cpp',
    57             'tests/InnerGestureRecognizerTest.cpp',
     57            'tests/CCLayerTreeHostTest.cpp',
    5858            'tests/CCThreadTaskTest.cpp',
    5959            'tests/CCThreadTest.cpp',
     
    6161            'tests/IDBKeyPathTest.cpp',
    6262            'tests/IDBLevelDBCodingTest.cpp',
     63            'tests/InnerGestureRecognizerTest.cpp',
    6364            'tests/KeyboardTest.cpp',
    6465            'tests/KURLTest.cpp',
  • trunk/Source/WebKit/chromium/public/WebWidget.h

    r89700 r89837  
    4848template <typename T> class WebVector;
    4949
     50// FIXME: remove this define once render_widget has been changed to issue threaded compositor calls
     51#define WEBWIDGET_HAS_ANIMATE_CHANGES 1
     52
    5053class WebWidget {
    5154public:
     
    6972    virtual void willEndLiveResize() { }
    7073
    71     // Called to update imperative animation state.  This should be called before
    72     // paint, although the client can rate-limit these calls.
    73     virtual void animate() { }
     74    // Called to update imperative animation state. This should be called before
     75    // paint, although the client can rate-limit these calls. When
     76    // frameBeginTime is 0.0, the WebWidget will determine the frame begin time
     77    // itself.
     78    virtual void animate(double frameBeginTime) { }
    7479
    7580    // Called to layout the WebWidget.  This MUST be called before Paint,
     
    7782    virtual void layout() { }
    7883
    79     // Called to paint the rectangular region within the WebWidget 
     84    // Called to paint the rectangular region within the WebWidget
    8085    // onto the specified canvas at (viewPort.x,viewPort.y). You MUST call
    8186    // Layout before calling this method.  It is okay to call paint
     
    8691    virtual void paint(WebCanvas*, const WebRect& viewPort) { }
    8792
    88     // Triggers compositing of the current layers onto the screen.
    89     // The finish argument controls whether the compositor will wait for the
    90     // GPU to finish rendering before returning. You MUST call Layout
    91     // before calling this method, for the same reasons described in
    92     // the paint method above.
    93     virtual void composite(bool finish) { }
     93    // In non-threaded compositing mode, triggers compositing of the current
     94    // layers onto the screen. You MUST call Layout before calling this method, for the same
     95    // reasons described in the paint method above
     96    //
     97    // In threaded compositing mode, indicates that the widget should update
     98    // itself, for example due to window damage. The redraw will begin
     99    // asynchronously and perform layout and animation internally. Do not call
     100    // animate or layout in this case.
     101    virtual void composite(bool finish) = 0;
    94102
    95103    // Called to inform the WebWidget of a change in theme.
  • trunk/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp

    r89700 r89837  
    168168}
    169169
    170 void WebPopupMenuImpl::animate()
     170void WebPopupMenuImpl::animate(double)
    171171{
    172172}
  • trunk/Source/WebKit/chromium/src/WebPopupMenuImpl.h

    r89700 r89837  
    6666    virtual void resize(const WebSize&);
    6767    virtual void willEndLiveResize();
    68     virtual void animate();
     68    virtual void animate(double frameBeginTime);
    6969    virtual void layout();
    7070    virtual void paint(WebCanvas* canvas, const WebRect& rect);
  • trunk/Source/WebKit/chromium/src/WebViewImpl.cpp

    r89700 r89837  
    149149
    150150using namespace WebCore;
     151using namespace std;
    151152
    152153namespace {
     
    10051006#if USE(ACCELERATED_COMPOSITING)
    10061007    if (m_layerRenderer && isAcceleratedCompositingActive()) {
    1007         m_layerRenderer->resizeOnscreenContent(IntSize(std::max(1, m_size.width),
    1008                                                        std::max(1, m_size.height)));
     1008        m_layerRenderer->resizeOnscreenContent(IntSize(max(1, m_size.width),
     1009                                                       max(1, m_size.height)));
    10091010    }
    10101011#endif
     
    10171018}
    10181019
    1019 void WebViewImpl::animate()
    1020 {
     1020void WebViewImpl::animate(double frameBeginTime)
     1021{
     1022#if ENABLE(REQUEST_ANIMATION_FRAME)
    10211023    TRACE_EVENT("WebViewImpl::animate", this, 0);
    1022 #if ENABLE(REQUEST_ANIMATION_FRAME)
     1024    // FIXME: remove this zero-check once render_widget has been modified to
     1025    // pass in a frameBeginTime.
     1026    if (!frameBeginTime)
     1027        frameBeginTime = currentTime();
    10231028    WebFrameImpl* webframe = mainFrameImpl();
    10241029    if (webframe) {
     
    10271032            if (m_layerRenderer)
    10281033                m_layerRenderer->setIsAnimating(true);
    1029             view->serviceScriptedAnimations(convertSecondsToDOMTimeStamp(currentTime()));
     1034            view->serviceScriptedAnimations(convertSecondsToDOMTimeStamp(frameBeginTime));
    10301035            if (m_layerRenderer)
    10311036                m_layerRenderer->setIsAnimating(false);
     
    10961101    if (isAcceleratedCompositingActive()) {
    10971102#if USE(ACCELERATED_COMPOSITING)
     1103#if USE(THREADED_COMPOSITING)
     1104        // FIXME: do readback in threaded compositing mode rather than returning nothing
     1105        return;
     1106#endif
    10981107        doComposite();
    10991108
     
    11291138}
    11301139
    1131 void WebViewImpl::composite(bool finish)
    1132 {
    1133 #if USE(ACCELERATED_COMPOSITING)
     1140void WebViewImpl::animateAndLayout(double frameBeginTime)
     1141{
     1142    animate(frameBeginTime);
     1143    layout();
     1144}
     1145
     1146void WebViewImpl::updateLayers()
     1147{
    11341148    // Update the compositing requirements for all frame in the tree before doing any painting
    11351149    // as the compositing requirements for a RenderLayer within a subframe might change.
     
    11371151        frame->view()->updateCompositingLayers();
    11381152    page()->mainFrame()->view()->syncCompositingStateIncludingSubframes();
    1139 
     1153}
     1154
     1155void WebViewImpl::composite(bool finish)
     1156{
     1157#if USE(ACCELERATED_COMPOSITING)
     1158#if USE(THREADED_COMPOSITING)
     1159    m_layerRenderer->setNeedsRedraw();
     1160#else
    11401161    TRACE_EVENT("WebViewImpl::composite", this, 0);
     1162
    11411163    if (m_recreatingGraphicsContext) {
    11421164        // reallocateRenderer will request a repaint whether or not it succeeded
     
    11471169    }
    11481170    doComposite();
    1149 
    1150     // Finish if requested.
    1151     if (finish)
    1152         m_layerRenderer->finish();
    11531171
    11541172    // Put result onscreen.
     
    11651183        setRootLayerNeedsDisplay();
    11661184    }
     1185#endif
    11671186#endif
    11681187}
     
    17791798        return;
    17801799
    1781     m_zoomLevel = std::max(std::min(zoomLevel, m_maximumZoomLevel), m_minimumZoomLevel);
     1800    m_zoomLevel = max(min(zoomLevel, m_maximumZoomLevel), m_minimumZoomLevel);
    17821801    m_client->zoomLevelChanged();
    17831802}
     
    17851804double WebView::zoomLevelToZoomFactor(double zoomLevel)
    17861805{
    1787     return std::pow(textSizeMultiplierRatio, zoomLevel);
     1806    return pow(textSizeMultiplierRatio, zoomLevel);
    17881807}
    17891808
     
    24192438void WebViewImpl::setRootLayerNeedsDisplay()
    24202439{
     2440#if USE(THREADED_COMPOSITING)
     2441    if (m_layerRenderer)
     2442        m_layerRenderer->setNeedsCommitAndRedraw();
     2443#else
    24212444    m_client->scheduleComposite();
     2445#endif
    24222446}
    24232447
     
    24912515    } else if (m_layerRenderer) {
    24922516        m_isAcceleratedCompositingActive = true;
    2493         m_layerRenderer->resizeOnscreenContent(WebCore::IntSize(std::max(1, m_size.width),
    2494                                                                 std::max(1, m_size.height)));
     2517        m_layerRenderer->resizeOnscreenContent(WebCore::IntSize(max(1, m_size.width),
     2518                                                                max(1, m_size.height)));
    24952519
    24962520        m_client->didActivateAcceleratedCompositing(true);
    24972521    } else {
    24982522        TRACE_EVENT("WebViewImpl::setIsAcceleratedCompositingActive(true)", this, 0);
    2499         RefPtr<GraphicsContext3D> context = m_temporaryOnscreenGraphicsContext3D.release();
    2500         if (!context) {
    2501             context = GraphicsContext3D::create(getCompositorContextAttributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow);
    2502             if (context)
    2503                 context->reshape(std::max(1, m_size.width), std::max(1, m_size.height));
    2504         }
    2505 
    2506 
    2507         m_layerRenderer = LayerRendererChromium::create(context.release(), WebViewImplContentPainter::create(this), m_page->settings()->acceleratedDrawingEnabled());
     2523
     2524        m_layerRenderer = LayerRendererChromium::create(this, WebViewImplContentPainter::create(this), m_page->settings()->acceleratedDrawingEnabled());
    25082525        if (m_layerRenderer) {
     2526            updateLayerRendererSettings();
    25092527            m_client->didActivateAcceleratedCompositing(true);
    25102528            m_isAcceleratedCompositingActive = true;
     
    25342552        return;
    25352553
    2536     m_layerRenderer->setCompositeOffscreen(settings()->compositeToTextureEnabled());
    2537 
    2538     CCHeadsUpDisplay* hud = m_layerRenderer->headsUpDisplay();
    2539     hud->setShowFPSCounter(settings()->showFPSCounter());
    2540     hud->setShowPlatformLayerTree(settings()->showPlatformLayerTree());
    2541 
    25422554    if (m_pageOverlay)
    25432555        m_pageOverlay->update();
    25442556
    2545     m_layerRenderer->updateAndDrawLayers();
     2557    m_layerRenderer->updateLayers();
     2558    m_layerRenderer->drawLayers();
     2559}
     2560
     2561PassRefPtr<GraphicsContext3D> WebViewImpl::createLayerTreeHostContext3D()
     2562{
     2563    RefPtr<GraphicsContext3D> context = m_temporaryOnscreenGraphicsContext3D.release();
     2564    if (!context) {
     2565        context = GraphicsContext3D::create(getCompositorContextAttributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow);
     2566        if (context)
     2567            context->reshape(max(1, m_size.width), max(1, m_size.height));
     2568    }
     2569    return context;
    25462570}
    25472571
    25482572void WebViewImpl::reallocateRenderer()
    25492573{
    2550     RefPtr<GraphicsContext3D> newContext = m_temporaryOnscreenGraphicsContext3D.get();
    2551     WebGraphicsContext3D* webContext = GraphicsContext3DInternal::extractWebGraphicsContext3D(newContext.get());
    2552     if (!newContext || !webContext || webContext->isContextLost())
    2553         newContext = GraphicsContext3D::create(
    2554             getCompositorContextAttributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow);
    25552574    // GraphicsContext3D::create might fail and return 0, in that case LayerRendererChromium::create will also return 0.
    2556     RefPtr<LayerRendererChromium> layerRenderer = LayerRendererChromium::create(newContext, WebViewImplContentPainter::create(this), m_page->settings()->acceleratedDrawingEnabled());
     2575    RefPtr<LayerRendererChromium> layerRenderer = LayerRendererChromium::create(this, WebViewImplContentPainter::create(this), m_page->settings()->acceleratedDrawingEnabled());
    25572576
    25582577    // Reattach the root layer.  Child layers will get reattached as a side effect of updateLayersRecursive.
     
    25602579        m_layerRenderer->transferRootLayer(layerRenderer.get());
    25612580        m_layerRenderer = layerRenderer;
     2581        updateLayerRendererSettings();
     2582
    25622583        // FIXME: In MacOS newContext->reshape method needs to be called to
    25632584        // allocate IOSurfaces. All calls to create a context followed by
     
    25652586        // immediately obvious that GraphicsContext3D object will not
    25662587        // function properly until its reshape method is called.
    2567         newContext->reshape(std::max(1, m_size.width), std::max(1, m_size.height));
     2588        layerRenderer->context()->reshape(max(1, m_size.width), max(1, m_size.height));
    25682589        setRootPlatformLayer(m_layerRenderer->rootLayer());
     2590
    25692591        // Forces ViewHostMsg_DidActivateAcceleratedCompositing to be sent so
    25702592        // that the browser process can reacquire surfaces.
     
    25772599#endif
    25782600
     2601void WebViewImpl::updateLayerRendererSettings()
     2602{
     2603    ASSERT(m_layerRenderer);
     2604    m_layerRenderer->setCompositeOffscreen(settings()->compositeToTextureEnabled());
     2605
     2606    CCHeadsUpDisplay* hud = m_layerRenderer->headsUpDisplay();
     2607    hud->setShowFPSCounter(settings()->showFPSCounter());
     2608    hud->setShowPlatformLayerTree(settings()->showPlatformLayerTree());
     2609}
     2610
    25792611void WebViewImpl::updateLayerRendererViewport()
    25802612{
    2581     ASSERT(m_layerRenderer);
    2582 
    25832613    if (!page())
    25842614        return;
     
    26082638        m_temporaryOnscreenGraphicsContext3D = GraphicsContext3D::create(getCompositorContextAttributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow);
    26092639        if (m_temporaryOnscreenGraphicsContext3D)
    2610             m_temporaryOnscreenGraphicsContext3D->reshape(std::max(1, m_size.width), std::max(1, m_size.height));
     2640            m_temporaryOnscreenGraphicsContext3D->reshape(max(1, m_size.width), max(1, m_size.height));
    26112641        return GraphicsContext3DInternal::extractWebGraphicsContext3D(m_temporaryOnscreenGraphicsContext3D.get());
    26122642    }
  • trunk/Source/WebKit/chromium/src/WebViewImpl.h

    r89700 r89837  
    5757class DocumentLoader;
    5858class Frame;
     59class GraphicsContext3D;
    5960class HistoryItem;
    6061class HitTestResult;
     
    8889class WebTouchEvent;
    8990
    90 class WebViewImpl : public WebView, public RefCounted<WebViewImpl> {
     91class WebViewImpl : public WebView, public WebCore::CCLayerTreeHostClient, public RefCounted<WebViewImpl> {
    9192public:
    9293    // WebWidget methods:
     
    9697    virtual void resize(const WebSize&);
    9798    virtual void willEndLiveResize();
    98     virtual void animate();
     99    virtual void animate(double frameBeginTime);
    99100    virtual void layout();
    100101    virtual void paint(WebCanvas*, const WebRect&);
     
    203204    virtual void performCustomContextMenuAction(unsigned action);
    204205
     206    // CCLayerTreeHostClient
     207    virtual void animateAndLayout(double frameBeginTime);
     208    virtual PassRefPtr<WebCore::GraphicsContext3D> createLayerTreeHostContext3D();
     209    virtual void updateLayers();
     210
    205211    // WebViewImpl
    206212
     
    357363    void scrollRootLayerRect(const WebCore::IntSize& scrollDelta, const WebCore::IntRect& clipRect);
    358364    void invalidateRootLayerRect(const WebCore::IntRect&);
     365    void doUpdateAndComposite();
    359366#endif
    360367
     
    424431    void doPixelReadbackToCanvas(WebCanvas*, const WebCore::IntRect&);
    425432    void reallocateRenderer();
     433    void updateLayerRendererSettings();
    426434    void updateLayerRendererViewport();
    427435#endif
  • trunk/Source/WebKit/chromium/tests/CCThreadTest.cpp

    r89700 r89837  
    5454    PingPongUsingCondition target;
    5555    CCCompletionEvent completion;
    56     thread->postTask(createCCThreadTask(&target, &PingPongUsingCondition::ping, 
     56    thread->postTask(createCCThreadTask(&target, &PingPongUsingCondition::ping,
    5757                                        AllowCrossThreadAccess(&completion)));
    5858    completion.wait();
  • trunk/Tools/ChangeLog

    r89834 r89837  
     12011-05-17  Nat Duca  <nduca@chromium.org>
     2
     3        Reviewed by James Robinson.
     4
     5        [chromium] Implement CCLayerTreeHost and CCLayerTreeHostImpl portions of threaded compositor
     6        https://bugs.webkit.org/show_bug.cgi?id=58408
     7
     8        * DumpRenderTree/chromium/WebViewHost.cpp:
     9        (WebViewHost::paintInvalidatedRegion):
     10
    1112011-06-27  Eric Seidel  <eric@webkit.org>
    212
  • trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp

    r89700 r89837  
    14871487{
    14881488#if ENABLE(REQUEST_ANIMATION_FRAME)
    1489     webWidget()->animate();
     1489    webWidget()->animate(0.0);
    14901490#endif
    14911491    webWidget()->layout();
Note: See TracChangeset for help on using the changeset viewer.