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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 3241 matching lines...) Expand 10 before | Expand all | Expand 10 after
3252 updateLayerTreeViewport(); 3252 updateLayerTreeViewport();
3253 3253
3254 // Relayout immediately to avoid violating the rule that needsLayout() 3254 // Relayout immediately to avoid violating the rule that needsLayout()
3255 // isn't set at the end of a layout. 3255 // isn't set at the end of a layout.
3256 if (view->needsLayout()) 3256 if (view->needsLayout())
3257 view->layout(); 3257 view->layout();
3258 } 3258 }
3259 3259
3260 void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription & description) 3260 void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription & description)
3261 { 3261 {
3262 if (!settings()->viewportEnabled() || !page() || (!m_size.width && !m_size.h eight) || !page()->mainFrame()->isLocalFrame()) 3262 if (!settings()->viewportEnabled() || !page() || (!m_size.width && !m_size.h eight) || !page()->mainFrame()->isLocalFrame()) {
3263 // If we're not reading the viewport meta tag, allow GPU rasterization.
3264 if (!settingsImpl()->viewportMetaEnabled()) {
ajuma 2014/12/17 20:36:16 WebSettingsImpl will still need this method added
3265 m_matchesHeuristicsForGpuRasterization = true;
3266 if (m_layerTreeView)
3267 m_layerTreeView->heuristicsForGpuRasterizationUpdated(m_matchesH euristicsForGpuRasterization);
3268 }
3263 return; 3269 return;
3264 3270 }
3265 Document* document = page()->deprecatedLocalMainFrame()->document(); 3271 Document* document = page()->deprecatedLocalMainFrame()->document();
3266 3272
3267 m_matchesHeuristicsForGpuRasterization = description.maxWidth == Length(Devi ceWidth); 3273 m_matchesHeuristicsForGpuRasterization = description.maxWidth == Length(Devi ceWidth);
3268 if (m_layerTreeView) 3274 if (m_layerTreeView)
3269 m_layerTreeView->heuristicsForGpuRasterizationUpdated(m_matchesHeuristic sForGpuRasterization); 3275 m_layerTreeView->heuristicsForGpuRasterizationUpdated(m_matchesHeuristic sForGpuRasterization);
3270 3276
3271 Length defaultMinWidth = document->viewportDefaultMinWidth(); 3277 Length defaultMinWidth = document->viewportDefaultMinWidth();
3272 if (defaultMinWidth.isAuto()) 3278 if (defaultMinWidth.isAuto())
3273 defaultMinWidth = Length(ExtendToZoom); 3279 defaultMinWidth = Length(ExtendToZoom);
3274 3280
(...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after
4520 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4526 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4521 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4527 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4522 } 4528 }
4523 4529
4524 void WebViewImpl::forceNextWebGLContextCreationToFail() 4530 void WebViewImpl::forceNextWebGLContextCreationToFail()
4525 { 4531 {
4526 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4532 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4527 } 4533 }
4528 4534
4529 } // namespace blink 4535 } // namespace blink
OLDNEW
« 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