Commit 8bffcae7 authored by Amy Qiu's avatar Amy Qiu Committed by Commit Bot

Merge image_decoding_cases page set into rendering page sets

Move image_decoding_cases into rendering folder and modify to inherit
from RenderingStory class

Bug: 849392
Change-Id: I56b02c60c1f674f7c48b8bf378b8bc92f68f4205
Reviewed-on: https://chromium-review.googlesource.com/1089290
Commit-Queue: Amy Qiu <amyqiu@google.com>
Reviewed-by: default avatarNed Nguyen <nednguyen@google.com>
Cr-Commit-Position: refs/heads/master@{#565377}
parent 32de3d2e
# Copyright 2014 The Chromium Authors. All rights reserved. # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
from telemetry.page import page as page_module from telemetry.page import shared_page_state
from telemetry import story from telemetry import story
class ImageDecodingCasesPage(page_module.Page): from page_sets.rendering import rendering_story
from page_sets.rendering import story_tags
def __init__(self, url, page_set, name):
super(ImageDecodingCasesPage, self).__init__( class ImageDecodingPage(rendering_story.RenderingStory):
url=url, page_set=page_set, name=name) ABSTRACT_STORY = True
TAGS = [story_tags.IMAGE_DECODING]
def __init__(self,
page_set,
shared_page_state_class=shared_page_state.SharedPageState,
name_suffix='',
extra_browser_args=None):
if extra_browser_args is None:
extra_browser_args = ['--disable-accelerated-jpeg-decoding']
super(ImageDecodingPage, self).__init__(
page_set=page_set,
shared_page_state_class=shared_page_state_class,
name_suffix=name_suffix,
extra_browser_args=extra_browser_args)
def RunPageInteractions(self, action_runner): def RunPageInteractions(self, action_runner):
with action_runner.CreateInteraction('DecodeImage'): with action_runner.CreateInteraction('DecodeImage'):
action_runner.Wait(5) action_runner.Wait(5)
class YuvDecodingPage(ImageDecodingPage):
BASE_NAME = 'yuv_decoding'
URL = 'file://../image_decoding_cases/yuv_decoding.html'
# TODO(crbug.com/760553):remove this class after
# smoothness.image_decoding_cases benchmark is completely
# replaced by rendering benchmarks
class ImageDecodingCasesPageSet(story.StorySet): class ImageDecodingCasesPageSet(story.StorySet):
""" A directed benchmark of accelerated jpeg image decoding performance """ """ A directed benchmark of accelerated jpeg image decoding performance """
...@@ -21,9 +45,4 @@ class ImageDecodingCasesPageSet(story.StorySet): ...@@ -21,9 +45,4 @@ class ImageDecodingCasesPageSet(story.StorySet):
def __init__(self): def __init__(self):
super(ImageDecodingCasesPageSet, self).__init__() super(ImageDecodingCasesPageSet, self).__init__()
urls_list = [ self.AddStory(YuvDecodingPage(self))
('file://image_decoding_cases/yuv_decoding.html', 'yuv_decoding')
]
for url, name in urls_list:
self.AddStory(ImageDecodingCasesPage(url, self, name))
...@@ -59,6 +59,16 @@ class RenderingStorySet(story.StorySet): ...@@ -59,6 +59,16 @@ class RenderingStorySet(story.StorySet):
name_suffix='_sync_scroll', name_suffix='_sync_scroll',
extra_browser_args=['--disable-threaded-scrolling'])) extra_browser_args=['--disable-threaded-scrolling']))
if (platform == platforms.MOBILE and
story_class.TAGS and
story_tags.IMAGE_DECODING in story_class.TAGS):
self.AddStory(story_class(
page_set=self,
shared_page_state_class=shared_page_state_class,
name_suffix='_gpu_rasterization_and_decoding',
extra_browser_args=['--force-gpu-rasterization',
'--enable-accelerated-jpeg-decoding']))
class DesktopRenderingStorySet(RenderingStorySet): class DesktopRenderingStorySet(RenderingStorySet):
"""Desktop stories related to rendering. """Desktop stories related to rendering.
......
...@@ -21,6 +21,8 @@ REQUIRED_WEBGL = Tag( ...@@ -21,6 +21,8 @@ REQUIRED_WEBGL = Tag(
'required_webgl', 'Stories that are skipped if no webgl support') 'required_webgl', 'Stories that are skipped if no webgl support')
PINCH_ZOOM = Tag( PINCH_ZOOM = Tag(
'pinch_zoom', 'Stories that only run on Mac for desktop cases') 'pinch_zoom', 'Stories that only run on Mac for desktop cases')
IMAGE_DECODING = Tag(
'image_decoding', 'Stories with accelerated jpeg decoding')
def _ExtractAllTags(): def _ExtractAllTags():
......
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