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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 792233007: blink: Enable the GPU trigger when viewport meta tag is not read (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove the settings changes Created 6 years 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 | 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 52ae322b52369a626dc11d301ee4ea4efe07971c..386cdd7c736b7b3f2d31334be496fafa3b7fd50a 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -3259,9 +3259,15 @@ void WebViewImpl::refreshPageScaleFactorAfterLayout()
void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription& description)
{
- if (!settings()->viewportEnabled() || !page() || (!m_size.width && !m_size.height) || !page()->mainFrame()->isLocalFrame())
+ if (!settings()->viewportEnabled() || !page() || (!m_size.width && !m_size.height) || !page()->mainFrame()->isLocalFrame()) {
+ // If we're not reading the viewport meta tag, allow GPU rasterization.
+ if (!settingsImpl()->viewportMetaEnabled()) {
ajuma 2014/12/17 20:36:16 WebSettingsImpl will still need this method added
+ m_matchesHeuristicsForGpuRasterization = true;
+ if (m_layerTreeView)
+ m_layerTreeView->heuristicsForGpuRasterizationUpdated(m_matchesHeuristicsForGpuRasterization);
+ }
return;
-
+ }
Document* document = page()->deprecatedLocalMainFrame()->document();
m_matchesHeuristicsForGpuRasterization = description.maxWidth == Length(DeviceWidth);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698