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

Side by Side Diff: third_party/WebKit/Source/web/tests/ViewportTest.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, 4 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 2774 matching lines...) Expand 10 before | Expand all | Expand 10 after
2785 } 2785 }
2786 2786
2787 TEST_F(ViewportTest, viewportTriggersGpuRasterization) 2787 TEST_F(ViewportTest, viewportTriggersGpuRasterization)
2788 { 2788 {
2789 FrameTestHelpers::WebViewHelper webViewHelper; 2789 FrameTestHelpers::WebViewHelper webViewHelper;
2790 2790
2791 registerMockedHttpURLLoad("viewport/viewport-gpu-rasterization-disabled-with out-viewport.html"); 2791 registerMockedHttpURLLoad("viewport/viewport-gpu-rasterization-disabled-with out-viewport.html");
2792 webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-gpu-rasteriza tion-disabled-without-viewport.html", true, nullptr, nullptr, nullptr, setViewpo rtSettings); 2792 webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-gpu-rasteriza tion-disabled-without-viewport.html", true, nullptr, nullptr, nullptr, setViewpo rtSettings);
2793 webViewHelper.webView()->resize(WebSize(640, 480)); 2793 webViewHelper.webView()->resize(WebSize(640, 480));
2794 EXPECT_FALSE(webViewHelper.webView()->matchesHeuristicsForGpuRasterizationFo rTesting()); 2794 EXPECT_FALSE(webViewHelper.webView()->matchesHeuristicsForGpuRasterizationFo rTesting());
2795 // Also test that setting enableViewport to false (as on desktop Chrome)
2796 // supports GPU raster unconditionally.
2797 webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-gpu-rasteriza tion-disabled-without-viewport.html", true);
2798 webViewHelper.webView()->resize(WebSize(640, 480));
2799 EXPECT_TRUE(webViewHelper.webView()->matchesHeuristicsForGpuRasterizationFor Testing());
2795 2800
2796 registerMockedHttpURLLoad("viewport/viewport-gpu-rasterization.html"); 2801 registerMockedHttpURLLoad("viewport/viewport-gpu-rasterization.html");
2797 webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-gpu-rasteriza tion.html", true, nullptr, nullptr, nullptr, setViewportSettings); 2802 webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-gpu-rasteriza tion.html", true, nullptr, nullptr, nullptr, setViewportSettings);
2798 webViewHelper.webView()->resize(WebSize(640, 480)); 2803 webViewHelper.webView()->resize(WebSize(640, 480));
2799 EXPECT_TRUE(webViewHelper.webView()->matchesHeuristicsForGpuRasterizationFor Testing()); 2804 EXPECT_TRUE(webViewHelper.webView()->matchesHeuristicsForGpuRasterizationFor Testing());
2800 2805
2801 registerMockedHttpURLLoad("viewport/viewport-gpu-rasterization-expanded-heur istics.html"); 2806 registerMockedHttpURLLoad("viewport/viewport-gpu-rasterization-expanded-heur istics.html");
2802 webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-gpu-rasteriza tion-expanded-heuristics.html", true, nullptr, nullptr, nullptr, setViewportSett ings); 2807 webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-gpu-rasteriza tion-expanded-heuristics.html", true, nullptr, nullptr, nullptr, setViewportSett ings);
2803 webViewHelper.webView()->resize(WebSize(640, 480)); 2808 webViewHelper.webView()->resize(WebSize(640, 480));
2804 EXPECT_TRUE(webViewHelper.webView()->matchesHeuristicsForGpuRasterizationFor Testing()); 2809 EXPECT_TRUE(webViewHelper.webView()->matchesHeuristicsForGpuRasterizationFor Testing());
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
3011 FrameTestHelpers::WebViewHelper webViewHelper; 3016 FrameTestHelpers::WebViewHelper webViewHelper;
3012 webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-warnings-7.ht ml", true, &webFrameClient, nullptr, nullptr, setViewportSettings); 3017 webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-warnings-7.ht ml", true, &webFrameClient, nullptr, nullptr, setViewportSettings);
3013 3018
3014 Page* page = webViewHelper.webView()->page(); 3019 Page* page = webViewHelper.webView()->page();
3015 runViewportTest(page, 320, 352); 3020 runViewportTest(page, 320, 352);
3016 3021
3017 EXPECT_EQ(0U, webFrameClient.messages.size()); 3022 EXPECT_EQ(0U, webFrameClient.messages.size());
3018 } 3023 }
3019 3024
3020 } // namespace blink 3025 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698