Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1459)

Unified Diff: Source/web/WebViewImpl.cpp

Issue 233323004: Move RenderLayerCompositor trigger caching to be when settings change (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed WebViewTest.SetBaseBackgroundColorAndBlendWithExistingContent Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 6e2085bdb363d92e0573da816a9c952436ebeece..27991386ee1f3aaeb42b07e8855da35ad1797a43 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -3728,6 +3728,14 @@ void WebViewImpl::scheduleAnimation()
m_client->scheduleAnimation();
}
+void WebViewImpl::setCompositorCreationFailed(bool failed)
+{
+ m_compositorCreationFailed = failed;
+ // ChromeClientImpl::allowedCompositingTriggers reads this bit, so we need
+ // to update the composting triggers.
+ m_page->updateAcceleratedCompositingSettings();
+}
+
void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
{
blink::Platform::current()->histogramEnumeration("GPU.setIsAcceleratedCompositingActive", active * 2 + m_isAcceleratedCompositingActive, 4);
@@ -3781,7 +3789,7 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
updateLayerTreeViewport();
m_client->didActivateCompositor();
m_isAcceleratedCompositingActive = true;
- m_compositorCreationFailed = false;
+ setCompositorCreationFailed(false);
if (m_pageOverlays)
m_pageOverlays->update();
m_layerTreeView->setShowFPSCounter(m_showFPSCounter);
@@ -3792,7 +3800,7 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
} else {
m_isAcceleratedCompositingActive = false;
m_client->didDeactivateCompositor();
- m_compositorCreationFailed = true;
+ setCompositorCreationFailed(true);
}
}
if (page())
@@ -3852,7 +3860,7 @@ void WebViewImpl::didExitCompositingMode()
{
ASSERT(m_isAcceleratedCompositingActive);
setIsAcceleratedCompositingActive(false);
- m_compositorCreationFailed = true;
+ setCompositorCreationFailed(true);
m_client->didInvalidateRect(IntRect(0, 0, m_size.width, m_size.height));
// Force a style recalc to remove all the composited layers.
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698