summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/src/WebViewImpl.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-10-23 10:25:11 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-10-23 10:25:11 +0200
commit5ea819f80c6840c492386bfafbffb059c7e2091f (patch)
tree42ad0b1d82eff090d14278a088ea0f4840a0f938 /Source/WebKit/chromium/src/WebViewImpl.cpp
parent43a42f108af6bcbd91f2672731c3047c26213af1 (diff)
downloadqtwebkit-5ea819f80c6840c492386bfafbffb059c7e2091f.tar.gz
Imported WebKit commit 20434eb8eb95065803473139d8794e98a7672f75 (http://svn.webkit.org/repository/webkit/trunk@132191)
New snapshot that should fix build with latest qtbase and the QPlastiqueStyle removal
Diffstat (limited to 'Source/WebKit/chromium/src/WebViewImpl.cpp')
-rw-r--r--Source/WebKit/chromium/src/WebViewImpl.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/Source/WebKit/chromium/src/WebViewImpl.cpp b/Source/WebKit/chromium/src/WebViewImpl.cpp
index 9f2a845dd..5277b7b34 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.cpp
+++ b/Source/WebKit/chromium/src/WebViewImpl.cpp
@@ -445,6 +445,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
#endif
, m_flingModifier(0)
, m_validationMessage(ValidationMessageClientImpl::create(*client))
+ , m_suppressInvalidations(false)
{
// WebKit/win/WebView.cpp does the same thing, except they call the
// KJS specific wrapper around this method. We need to have threading
@@ -3766,6 +3767,11 @@ bool WebViewImpl::tabsToLinks() const
return m_tabsToLinks;
}
+void WebViewImpl::suppressInvalidations(bool enable)
+{
+ m_suppressInvalidations = enable;
+}
+
#if USE(ACCELERATED_COMPOSITING)
bool WebViewImpl::allowsAcceleratedCompositing()
{
@@ -3774,6 +3780,8 @@ bool WebViewImpl::allowsAcceleratedCompositing()
void WebViewImpl::setRootGraphicsLayer(GraphicsLayer* layer)
{
+ TemporaryChange<bool> change(m_suppressInvalidations, true);
+
m_rootGraphicsLayer = layer;
m_rootLayer = layer ? layer->platformLayer() : 0;
@@ -3797,7 +3805,7 @@ void WebViewImpl::setRootGraphicsLayer(GraphicsLayer* layer)
}
IntRect damagedRect(0, 0, m_size.width, m_size.height);
- if (!m_isAcceleratedCompositingActive)
+ if (!m_isAcceleratedCompositingActive && !m_suppressInvalidations)
m_client->didInvalidateRect(damagedRect);
}
@@ -4096,6 +4104,11 @@ void WebViewImpl::didRecreateOutputSurface(bool success)
void WebViewImpl::scheduleComposite()
{
+ if (m_suppressInvalidations) {
+ TRACE_EVENT0("webkit", "WebViewImpl invalidations suppressed");
+ return;
+ }
+
ASSERT(!Platform::current()->compositorSupport()->isThreadingEnabled());
m_client->scheduleComposite();
}