diff options
author | dongseong.hwang <dongseong.hwang@intel.com> | 2016-01-12 00:45:00 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-12 08:46:08 +0000 |
commit | efe2127d44f311fe1c0f547b8121dc85d8d3d679 (patch) | |
tree | ce70035228d3a684fd473a0e5387eda682f6a16c /tools/perf/page_sets | |
parent | ee1b475b12b7ee94acf7ba737b2be85e74552a0b (diff) | |
download | chromium_src-efe2127d44f311fe1c0f547b8121dc85d8d3d679.zip chromium_src-efe2127d44f311fe1c0f547b8121dc85d8d3d679.tar.gz chromium_src-efe2127d44f311fe1c0f547b8121dc85d8d3d679.tar.bz2 |
Add compositor_heavy_animation.html in tough_animation_cases
Create 200 divs and start opacity animations.
native zero-copy in some platform (e.g. ChromeOS) can use linear layout texture
while native one-copy uses tiling layout texture. It can affect compositing
performance due to different cache miss rate. To track this, add new test in
which the composition is bottleneck because of GPU memory bandwidth saturated.
In addition, this test is helpful to track Blink/cc animation performance.
This test doesn't change CSS style change except for loading time. So Blink/cc
shouldn't do anything redundant for animation.
BUG=526722
TEST=tools/perf/run_benchmark smoothness.tough_animation_cases --browser=release --story-filter=compositor_heavy_animation.html
Review URL: https://codereview.chromium.org/1424933008
Cr-Commit-Position: refs/heads/master@{#368828}
Diffstat (limited to 'tools/perf/page_sets')
-rw-r--r-- | tools/perf/page_sets/tough_animation_cases.py | 4 | ||||
-rw-r--r-- | tools/perf/page_sets/tough_animation_cases/compositor_heavy_animation.html | 66 |
2 files changed, 70 insertions, 0 deletions
diff --git a/tools/perf/page_sets/tough_animation_cases.py b/tools/perf/page_sets/tough_animation_cases.py index fc7ce51..3728678 100644 --- a/tools/perf/page_sets/tough_animation_cases.py +++ b/tools/perf/page_sets/tough_animation_cases.py @@ -229,6 +229,10 @@ class ToughAnimationCasesPageSet(story.StorySet): # Why: Tests simple transform animations using Web Animations. # pylint: disable=line-too-long 'file://tough_animation_cases/css_value_type_transform_simple.html?api=web_animations&N=0316', + + # Why: Test to update and then draw many times a large set of textures + # to compare one-copy and zero-copy. + 'file://tough_animation_cases/compositor_heavy_animation.html?N=0200', ] for url in urls_list_one: diff --git a/tools/perf/page_sets/tough_animation_cases/compositor_heavy_animation.html b/tools/perf/page_sets/tough_animation_cases/compositor_heavy_animation.html new file mode 100644 index 0000000..d6281ca --- /dev/null +++ b/tools/perf/page_sets/tough_animation_cases/compositor_heavy_animation.html @@ -0,0 +1,66 @@ +<!DOCTYPE html> +<html> +<head> + <style type="text/css"> + #backdrop { + float: left; + width: 512px; + height: 512px; + isolation: isolate; + background-image: linear-gradient(to bottom, + rgba(255, 255, 0, 0.9), + rgba(255, 0, 0, 0.9), + rgba(0, 255, 0, 0.9), + rgba(0, 0, 255, 0.9), + rgba(0, 0, 0, 0.9)); + position: absolute; + top: 100px; + left: 100px; + } + + #backdrop div { + position: absolute; + width: 100%; + height: 100%; + border-radius: 2px; + -webkit-transform-style: preserve-3d; + } + </style> + <script src="resources/perf_test_helper.js"></script> + <script type="text/javascript"> + var N = PerfTestHelper.getN(200); + var duration = 2000; + function randomColorGenerator() + { + return '#' + Math.floor(Math.random()*16777215).toString(16); + } + function makeKeyframes() { + var keyframes = []; + var numKeyframes = 2; + for (var i = 0; i < numKeyframes + 1; i++) { + var fraction = i / numKeyframes; + var t = (fraction * 0.6) + 0.1; + keyframes.push({opacity: t}); + } + return keyframes; + } + function startExperiment() + { + var keyframes = makeKeyframes(); + for (var i = 0; i < N; i++) { + var elem = document.createElement("div"); + elem.style.backgroundColor = randomColorGenerator(); + elem.style.webkitTransform = "rotateZ(" + ((i + 1) * 10.1).toString() + "deg)"; + backdrop.appendChild(elem); + elem.animate(keyframes, {duration: duration, iterations: Infinity, + direction: 'alternate', delay: -2 * duration * Math.random()}); + } + PerfTestHelper.signalReady(); + } + window.addEventListener('load', startExperiment, false); + </script> +</head> +<body> +<div id="backdrop"></div> +</body> +</html> |