diff options
| author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
| commit | 2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (patch) | |
| tree | 988e8c5b116dd0466244ae2fe5af8ee9be926d76 /Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp | |
| parent | dd91e772430dc294e3bf478c119ef8d43c0a3358 (diff) | |
| download | qtwebkit-2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47.tar.gz | |
Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286)
Diffstat (limited to 'Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp')
| -rw-r--r-- | Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp b/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp index 335879b66..161f9e932 100644 --- a/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp +++ b/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp @@ -41,13 +41,13 @@ using namespace WebCore; namespace WebKit { -PassRefPtr<WebLayerTreeViewImpl> WebLayerTreeViewImpl::create(WebLayerTreeViewClient* client, const WebLayer& root, const WebLayerTreeView::Settings& settings) +PassOwnPtr<WebLayerTreeViewImpl> WebLayerTreeViewImpl::create(WebLayerTreeViewClient* client, const WebLayer& root, const WebLayerTreeView::Settings& settings) { - RefPtr<WebLayerTreeViewImpl> host = adoptRef(new WebLayerTreeViewImpl(client, settings)); + OwnPtr<WebLayerTreeViewImpl> host = adoptPtr(new WebLayerTreeViewImpl(client, settings)); if (!host->initialize()) - return 0; + return nullptr; host->setRootLayer(root); - return host; + return host.release(); } WebLayerTreeViewImpl::WebLayerTreeViewImpl(WebLayerTreeViewClient* client, const WebLayerTreeView::Settings& settings) @@ -60,28 +60,28 @@ WebLayerTreeViewImpl::~WebLayerTreeViewImpl() { } -void WebLayerTreeViewImpl::updateAnimations(double frameBeginTime) +void WebLayerTreeViewImpl::willBeginFrame() +{ + m_client->willBeginFrame(); +} + +void WebLayerTreeViewImpl::updateAnimations(double monotonicFrameBeginTime) { - if (m_client) - m_client->updateAnimations(frameBeginTime); + m_client->updateAnimations(monotonicFrameBeginTime); } void WebLayerTreeViewImpl::layout() { - if (m_client) - m_client->layout(); + m_client->layout(); } void WebLayerTreeViewImpl::applyScrollAndScale(const WebCore::IntSize& scrollDelta, float pageScale) { - if (m_client) - m_client->applyScrollAndScale(WebSize(scrollDelta), pageScale); + m_client->applyScrollAndScale(WebSize(scrollDelta), pageScale); } PassRefPtr<GraphicsContext3D> WebLayerTreeViewImpl::createContext() { - if (!m_client) - return 0; OwnPtr<WebGraphicsContext3D> webContext = adoptPtr(m_client->createContext3D()); if (!webContext) return 0; @@ -91,26 +91,27 @@ PassRefPtr<GraphicsContext3D> WebLayerTreeViewImpl::createContext() void WebLayerTreeViewImpl::didRecreateContext(bool success) { - if (m_client) - m_client->didRebindGraphicsContext(success); + m_client->didRebindGraphicsContext(success); +} + +void WebLayerTreeViewImpl::didCommit() +{ + m_client->didCommit(); } void WebLayerTreeViewImpl::didCommitAndDrawFrame() { - if (m_client) - m_client->didCommitAndDrawFrame(); + m_client->didCommitAndDrawFrame(); } void WebLayerTreeViewImpl::didCompleteSwapBuffers() { - if (m_client) - m_client->didCompleteSwapBuffers(); + m_client->didCompleteSwapBuffers(); } void WebLayerTreeViewImpl::scheduleComposite() { - if (m_client) - m_client->scheduleComposite(); + m_client->scheduleComposite(); } } // namespace WebKit |
