Commit 330219a3 authored by ajuma@chromium.org's avatar ajuma@chromium.org

Revert of Widen GPU trigger condition (patchset #3 id:40001 of...

Revert of Widen GPU trigger condition (patchset #3 id:40001 of https://codereview.chromium.org/660133005/)

Reason for revert:
There's content that depends on the existing trigger in order to
opt-out of GPU rasterization. Since we're close to the branch point,
let's revert this and then try to expand again in M41.

Original issue's description:
> Widen GPU trigger condition
> 
> GPU rasterization will be triggered when viewports meet either of the 
> following conditions:
> 1) width=device-width, minimum-scale=X, where X >= 1.0
> 2) width=device-width, user-scalable=no
> 
> BUG=424469
> 
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=184566

BUG=424469

Review URL: https://codereview.chromium.org/685003008

git-svn-id: svn://svn.chromium.org/blink/trunk@184848 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent f6d88554
...@@ -3259,8 +3259,8 @@ void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription ...@@ -3259,8 +3259,8 @@ void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription
Document* document = page()->deprecatedLocalMainFrame()->document(); Document* document = page()->deprecatedLocalMainFrame()->document();
m_matchesHeuristicsForGpuRasterization = description.maxWidth == Length(DeviceWidth) m_matchesHeuristicsForGpuRasterization = description.maxWidth == Length(DeviceWidth)
&& ((description.minZoom >= 1.0 && description.minZoomIsExplicit) && description.minZoom == 1.0
|| !description.userZoom); && description.minZoomIsExplicit;
if (m_layerTreeView) if (m_layerTreeView)
m_layerTreeView->heuristicsForGpuRasterizationUpdated(m_matchesHeuristicsForGpuRasterization); m_layerTreeView->heuristicsForGpuRasterizationUpdated(m_matchesHeuristicsForGpuRasterization);
......
...@@ -2947,21 +2947,6 @@ TEST_F(ViewportTest, viewportTriggersGpuRasterization) ...@@ -2947,21 +2947,6 @@ TEST_F(ViewportTest, viewportTriggersGpuRasterization)
webViewHelper.webView()->resize(WebSize(640, 480)); webViewHelper.webView()->resize(WebSize(640, 480));
EXPECT_TRUE(webViewHelper.webViewImpl()->matchesHeuristicsForGpuRasterizationForTesting()); EXPECT_TRUE(webViewHelper.webViewImpl()->matchesHeuristicsForGpuRasterizationForTesting());
registerMockedHttpURLLoad("viewport/viewport-gpu-rasterization-device-width-minimum-scale-1.5.html");
webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-gpu-rasterization-device-width-minimum-scale-1.5.html", true, 0, 0, setViewportSettings);
webViewHelper.webView()->resize(WebSize(640, 480));
EXPECT_TRUE(webViewHelper.webViewImpl()->matchesHeuristicsForGpuRasterizationForTesting());
registerMockedHttpURLLoad("viewport/viewport-gpu-rasterization-device-width-minimum-scale-0.5.html");
webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-gpu-rasterization-device-width-minimum-scale-0.5.html", true, 0, 0, setViewportSettings);
webViewHelper.webView()->resize(WebSize(640, 480));
EXPECT_FALSE(webViewHelper.webViewImpl()->matchesHeuristicsForGpuRasterizationForTesting());
registerMockedHttpURLLoad("viewport/viewport-gpu-rasterization-device-width-non-user-scalable.html");
webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-gpu-rasterization-device-width-non-user-scalable.html", true, 0, 0, setViewportSettings);
webViewHelper.webView()->resize(WebSize(640, 480));
EXPECT_TRUE(webViewHelper.webViewImpl()->matchesHeuristicsForGpuRasterizationForTesting());
registerMockedHttpURLLoad("viewport/viewport-inferred-values-do-not-trigger-gpu-rasterization.html"); registerMockedHttpURLLoad("viewport/viewport-inferred-values-do-not-trigger-gpu-rasterization.html");
webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-inferred-values-do-not-trigger-gpu-rasterization.html", true, 0, 0, setViewportSettings); webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-inferred-values-do-not-trigger-gpu-rasterization.html", true, 0, 0, setViewportSettings);
webViewHelper.webView()->resize(WebSize(640, 480)); webViewHelper.webView()->resize(WebSize(640, 480));
......
<head>
<title>Viewport that does not trigger GPU rasterization</title>
<meta name="viewport" content="width=device-width, minimum-scale=0.5">
</head>
<body></body>
<head>
<title>Viewport that triggers GPU rasterization</title>
<meta name="viewport" content="width=device-width, minimum-scale=1.5">
</head>
<body></body>
<head>
<title>Viewport that triggers GPU rasterization</title>
<meta name="viewport" content="width=device-width, user-scalable=no">
</head>
<body></body>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment