From 2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 7 May 2012 11:21:11 +0200 Subject: Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286) --- .../WebKit/chromium/src/WebLayerTreeViewImpl.cpp | 43 +++++++++++----------- 1 file changed, 22 insertions(+), 21 deletions(-) (limited to 'Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp') 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::create(WebLayerTreeViewClient* client, const WebLayer& root, const WebLayerTreeView::Settings& settings) +PassOwnPtr WebLayerTreeViewImpl::create(WebLayerTreeViewClient* client, const WebLayer& root, const WebLayerTreeView::Settings& settings) { - RefPtr host = adoptRef(new WebLayerTreeViewImpl(client, settings)); + OwnPtr 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 WebLayerTreeViewImpl::createContext() { - if (!m_client) - return 0; OwnPtr webContext = adoptPtr(m_client->createContext3D()); if (!webContext) return 0; @@ -91,26 +91,27 @@ PassRefPtr 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 -- cgit v1.2.1