Commit 76bfe25e authored by erikchen's avatar erikchen Committed by Commit bot

Add power test for css filter effect animation.

The test is exceedingly simple. It uses 2D Canvas to draw a gradient, then it
uses a css filter effect animation to modulate the radius of a gaussian blur
effect.

BUG=616811, 581526

Review-Url: https://codereview.chromium.org/2153913003
Cr-Commit-Position: refs/heads/master@{#405915}
parent c340d8d6
......@@ -70,6 +70,16 @@ class TrivialWebGLPage(page_module.Page):
shared_page_state_class=shared_page_state_class)
class TrivialBlurAnimationPage(page_module.Page):
def __init__(self, page_set, shared_page_state_class):
super(TrivialBlurAnimationPage, self).__init__(
url='file://trivial_sites/trivial_blur_animation.html',
page_set=page_set,
name=self.__class__.__name__ + shared_page_state_class.__name__,
shared_page_state_class=shared_page_state_class)
class MacGpuTrivialPagesStorySet(story.StorySet):
def __init__(self):
......@@ -79,14 +89,20 @@ class MacGpuTrivialPagesStorySet(story.StorySet):
self, shared_page_state.SharedPageState))
self.AddStory(TrivialCanvasPage(self, shared_page_state.SharedPageState))
self.AddStory(TrivialWebGLPage(self, shared_page_state.SharedPageState))
self.AddStory(TrivialBlurAnimationPage(
self, shared_page_state.SharedPageState))
self.AddStory(TrivialScrollingPage(self, _NoOverlaysSharedPageState))
self.AddStory(TrivialBlinkingCursorPage(self, _NoOverlaysSharedPageState))
self.AddStory(TrivialCanvasPage(self, _NoOverlaysSharedPageState))
self.AddStory(TrivialWebGLPage(self, _NoOverlaysSharedPageState))
self.AddStory(TrivialBlurAnimationPage(self, _NoOverlaysSharedPageState))
self.AddStory(TrivialScrollingPage(self, _NoGpuSharedPageState))
self.AddStory(TrivialBlinkingCursorPage(self, _NoGpuSharedPageState))
self.AddStory(TrivialCanvasPage(self, _NoGpuSharedPageState))
self.AddStory(TrivialWebGLPage(self, _NoWebGLImageChromiumSharedPageState))
self.AddStory(TrivialBlurAnimationPage(self, _NoGpuSharedPageState))
@property
def allow_mixed_story_states(self):
......
<!doctype html>
<!--
Copyright 2016 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<html style="height:100%">
<head>
<style>
html, body {
margin: 0;
padding: 0;
}
@-webkit-keyframes blur-anim {
from { -webkit-filter: blur(0); }
to { -webkit-filter: blur(50px); }
}
canvas {
-webkit-animation: blur-anim 1.5s linear;
-webkit-animation-direction: alternate;
-webkit-animation-iteration-count: infinite;
}
</style>
</head>
<body style="height:100%">
<canvas id="canvas" width="200" height="100"></canvas>
</body>
<script>
var canvas = document.querySelector('canvas');
canvas.style.width ='100%';
canvas.style.height='100%';
canvas.width = canvas.offsetWidth;
canvas.height = canvas.offsetHeight;
var ctx = canvas.getContext("2d");
var grd=ctx.createLinearGradient(0,0,canvas.width,0);
grd.addColorStop(0,"red");
grd.addColorStop(1,"green");
ctx.fillStyle=grd;
ctx.fillRect(0, 0, canvas.width, canvas.height);
</script>
</html>
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