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/WebLayerTreeView.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/WebLayerTreeView.cpp')
-rw-r--r-- | Source/WebKit/chromium/src/WebLayerTreeView.cpp | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/Source/WebKit/chromium/src/WebLayerTreeView.cpp b/Source/WebKit/chromium/src/WebLayerTreeView.cpp index 3314dc2f5..6c18f6742 100644 --- a/Source/WebKit/chromium/src/WebLayerTreeView.cpp +++ b/Source/WebKit/chromium/src/WebLayerTreeView.cpp @@ -41,7 +41,6 @@ WebLayerTreeView::Settings::operator CCSettings() const { CCSettings settings; settings.acceleratePainting = acceleratePainting; - settings.compositeOffscreen = compositeOffscreen; settings.showFPSCounter = showFPSCounter; settings.showPlatformLayerTree = showPlatformLayerTree; settings.refreshRate = refreshRate; @@ -55,23 +54,24 @@ WebLayerTreeView::Settings::operator CCSettings() const void WebLayerTreeView::reset() { - m_private.reset(); + m_private.reset(0); } -void WebLayerTreeView::assign(const WebLayerTreeView& other) +bool WebLayerTreeView::isNull() const { - m_private = other.m_private; + return !m_private.get(); } -bool WebLayerTreeView::equals(const WebLayerTreeView& n) const +bool WebLayerTreeView::initialize(WebLayerTreeViewClient* client, const WebLayer& root, const WebLayerTreeView::Settings& settings) { - return (m_private.get() == n.m_private.get()); + // We have to leak the pointer here into a WebPrivateOwnPtr. We free this object in reset(). + m_private.reset(WebLayerTreeViewImpl::create(client, root, settings).leakPtr()); + return !isNull(); } -bool WebLayerTreeView::initialize(WebLayerTreeViewClient* client, const WebLayer& root, const WebLayerTreeView::Settings& settings) +void WebLayerTreeView::setSurfaceReady() { - m_private = WebLayerTreeViewImpl::create(client, root, settings); - return !isNull(); + m_private->setSurfaceReady(); } void WebLayerTreeView::setRootLayer(WebLayer *root) @@ -97,6 +97,11 @@ WebSize WebLayerTreeView::viewportSize() const return WebSize(m_private->viewportSize()); } +void WebLayerTreeView::setBackgroundColor(WebColor color) +{ + m_private->setBackgroundColor(color); +} + void WebLayerTreeView::setVisible(bool visible) { m_private->setVisible(visible); @@ -122,6 +127,11 @@ void WebLayerTreeView::setNeedsRedraw() m_private->setNeedsRedraw(); } +bool WebLayerTreeView::commitRequested() const +{ + return m_private->commitRequested(); +} + void WebLayerTreeView::composite() { if (CCProxy::hasImplThread()) |