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

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2127023002: Toggle GPU raster heuristics based on viewportEnabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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 | « no previous file | third_party/WebKit/Source/web/tests/ViewportTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index fd50765a3d526faa0323d6805470ffd402e00f3a..dcde1b1f4fbadfac3acf4710730e3308bab66ee2 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -3428,19 +3428,17 @@ void WebViewImpl::refreshPageScaleFactorAfterLayout()
void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription& description)
{
- // If we're not reading the viewport meta tag, allow GPU rasterization.
- if (!settingsImpl()->viewportMetaEnabled()) {
- m_matchesHeuristicsForGpuRasterization = true;
- if (m_layerTreeView)
- m_layerTreeView->heuristicsForGpuRasterizationUpdated(m_matchesHeuristicsForGpuRasterization);
- }
-
if (!page() || (!m_size.width && !m_size.height) || !page()->mainFrame()->isLocalFrame())
return;
if (!settings()->viewportEnabled()) {
pageScaleConstraintsSet().clearPageDefinedConstraints();
updateMainFrameLayoutSize();
+
+ // If we don't support mobile viewports, allow GPU rasterization.
+ m_matchesHeuristicsForGpuRasterization = true;
+ if (m_layerTreeView)
+ m_layerTreeView->heuristicsForGpuRasterizationUpdated(m_matchesHeuristicsForGpuRasterization);
return;
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/tests/ViewportTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698