Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 3346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3357 newPageScaleFactor = m_pageScaleConstraintsSet.finalConstraints().initia lScale; | 3357 newPageScaleFactor = m_pageScaleConstraintsSet.finalConstraints().initia lScale; |
| 3358 m_pageScaleConstraintsSet.setNeedsReset(false); | 3358 m_pageScaleConstraintsSet.setNeedsReset(false); |
| 3359 } | 3359 } |
| 3360 setPageScaleFactor(newPageScaleFactor); | 3360 setPageScaleFactor(newPageScaleFactor); |
| 3361 | 3361 |
| 3362 updateLayerTreeViewport(); | 3362 updateLayerTreeViewport(); |
| 3363 } | 3363 } |
| 3364 | 3364 |
| 3365 void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription & description) | 3365 void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription & description) |
| 3366 { | 3366 { |
| 3367 if (!settings()->viewportEnabled() || !page() || (!m_size.width && !m_size.h eight) || !page()->mainFrame()->isLocalFrame()) | 3367 if (!settings()->viewportEnabled() || !page() || (!m_size.width && !m_size.h eight) || !page()->mainFrame()->isLocalFrame()) { |
| 3368 // If we're not reading the viewport meta tag, allow GPU rasterization. | |
|
aelias_OOO_until_Jul13
2015/02/28 01:13:33
Could you move the new code to the top of this fun
| |
| 3369 if (!settingsImpl()->viewportMetaEnabled()) { | |
| 3370 m_matchesHeuristicsForGpuRasterization = true; | |
| 3371 if (m_layerTreeView) | |
| 3372 m_layerTreeView->heuristicsForGpuRasterizationUpdated(m_matchesH euristicsForGpuRasterization); | |
| 3373 } | |
| 3368 return; | 3374 return; |
| 3369 | 3375 } |
| 3370 Document* document = page()->deprecatedLocalMainFrame()->document(); | 3376 Document* document = page()->deprecatedLocalMainFrame()->document(); |
| 3371 | 3377 |
| 3372 m_matchesHeuristicsForGpuRasterization = description.maxWidth == Length(Devi ceWidth) | 3378 m_matchesHeuristicsForGpuRasterization = description.maxWidth == Length(Devi ceWidth) |
| 3373 && description.minZoom == 1.0 | 3379 && description.minZoom == 1.0 |
| 3374 && description.minZoomIsExplicit; | 3380 && description.minZoomIsExplicit; |
| 3375 if (m_layerTreeView) | 3381 if (m_layerTreeView) |
| 3376 m_layerTreeView->heuristicsForGpuRasterizationUpdated(m_matchesHeuristic sForGpuRasterization); | 3382 m_layerTreeView->heuristicsForGpuRasterizationUpdated(m_matchesHeuristic sForGpuRasterization); |
| 3377 | 3383 |
| 3378 Length defaultMinWidth = document->viewportDefaultMinWidth(); | 3384 Length defaultMinWidth = document->viewportDefaultMinWidth(); |
| 3379 if (defaultMinWidth.isAuto()) | 3385 if (defaultMinWidth.isAuto()) |
| (...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4671 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4677 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4672 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); | 4678 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); |
| 4673 } | 4679 } |
| 4674 | 4680 |
| 4675 void WebViewImpl::forceNextWebGLContextCreationToFail() | 4681 void WebViewImpl::forceNextWebGLContextCreationToFail() |
| 4676 { | 4682 { |
| 4677 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4683 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
| 4678 } | 4684 } |
| 4679 | 4685 |
| 4680 } // namespace blink | 4686 } // namespace blink |
| OLD | NEW |