Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 from telemetry.story import story_set as story_set_module | 5 from telemetry.story import story_set as story_set_module |
| 6 | 6 |
| 7 import sys | 7 import sys |
| 8 | 8 |
| 9 from gpu_tests import gpu_test_base | 9 from gpu_tests import gpu_test_base |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 41 | 41 |
| 42 | 42 |
| 43 class IOSurface2DCanvasSharedPageState(gpu_test_base.GpuSharedPageState): | 43 class IOSurface2DCanvasSharedPageState(gpu_test_base.GpuSharedPageState): |
| 44 def __init__(self, test, finder_options, story_set): | 44 def __init__(self, test, finder_options, story_set): |
| 45 super(IOSurface2DCanvasSharedPageState, self).__init__( | 45 super(IOSurface2DCanvasSharedPageState, self).__init__( |
| 46 test, finder_options, story_set) | 46 test, finder_options, story_set) |
| 47 finder_options.browser_options.AppendExtraBrowserArgs( | 47 finder_options.browser_options.AppendExtraBrowserArgs( |
| 48 ['--enable-accelerated-2d-canvas', | 48 ['--enable-accelerated-2d-canvas', |
| 49 '--disable-display-list-2d-canvas']) | 49 '--disable-display-list-2d-canvas']) |
| 50 | 50 |
| 51 class SoftwareOffscreenCanvas2DSharedPageState( | |
| 52 gpu_test_base.GpuSharedPageState): | |
| 53 def __init__(self, test, finder_options, story_set): | |
| 54 super(SoftwareOffscreenCanvas2DSharedPageState, self).__init__( | |
| 55 test, finder_options, story_set) | |
| 56 finder_options.browser_options.AppendExtraBrowserArgs( | |
| 57 ['--disable-accelerated-2d-canvas', | |
| 58 '--disable-gpu-compositing', | |
| 59 '--enable-experimental-canvas-features']) | |
| 51 | 60 |
| 52 class WebGLNonChromiumImageSharedPageState(gpu_test_base.GpuSharedPageState): | 61 class WebGLNonChromiumImageSharedPageState(gpu_test_base.GpuSharedPageState): |
| 53 def __init__(self, test, finder_options, story_set): | 62 def __init__(self, test, finder_options, story_set): |
| 54 super(WebGLNonChromiumImageSharedPageState, self).__init__( | 63 super(WebGLNonChromiumImageSharedPageState, self).__init__( |
| 55 test, finder_options, story_set) | 64 test, finder_options, story_set) |
| 56 finder_options.browser_options.AppendExtraBrowserArgs( | 65 finder_options.browser_options.AppendExtraBrowserArgs( |
| 57 ['--disable-webgl-image-chromium']) | 66 ['--disable-webgl-image-chromium']) |
| 58 | 67 |
| 59 | 68 |
| 60 class DisableMacOverlaysSharedPageState(gpu_test_base.GpuSharedPageState): | 69 class DisableMacOverlaysSharedPageState(gpu_test_base.GpuSharedPageState): |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 128 | 137 |
| 129 self.AddStory(PixelTestsPage( | 138 self.AddStory(PixelTestsPage( |
| 130 url='file://../../data/gpu/pixel_acceleratedOffscreen2d_commit_worker.html ', | 139 url='file://../../data/gpu/pixel_acceleratedOffscreen2d_commit_worker.html ', |
| 131 name=base_name + '.OffscreenCanvasAccelerated2DWorker', | 140 name=base_name + '.OffscreenCanvasAccelerated2DWorker', |
| 132 test_rect=[0, 0, 350, 350], | 141 test_rect=[0, 0, 350, 350], |
| 133 revision=1, | 142 revision=1, |
| 134 story_set=self, | 143 story_set=self, |
| 135 shared_page_state_class=EnableExperimentalCanvasFeaturesSharedPageState, | 144 shared_page_state_class=EnableExperimentalCanvasFeaturesSharedPageState, |
| 136 expectations=expectations)) | 145 expectations=expectations)) |
| 137 | 146 |
| 147 # Pages requiring the use of --enable-experimental-canvas-features and | |
| 148 # --disable-accelerated-2d-canvas. | |
| 149 self.AddStory(PixelTestsPage( | |
|
Ken Russell (switch to Gerrit)
2016/09/29 22:47:28
This new page should now be added to src/content/t
| |
| 150 url='file://../../data/gpu/pixel_acceleratedOffscreen2d_commit_main.html', | |
| 151 name=base_name + '.OffscreenCanvasUnaccelerated2D', | |
| 152 test_rect=[0, 0, 350, 350], | |
| 153 revision=1, | |
| 154 story_set=self, | |
| 155 shared_page_state_class=SoftwareOffscreenCanvas2DSharedPageState, | |
| 156 expectations=expectations)) | |
| 138 | 157 |
| 139 # Would be better to fetch this from Telemetry. | 158 # Would be better to fetch this from Telemetry. |
| 140 # TODO(kbr): enable this on all platforms. Don't know what will | 159 # TODO(kbr): enable this on all platforms. Don't know what will |
| 141 # happen on Android right now. | 160 # happen on Android right now. |
| 142 if try_es3 and sys.platform.startswith('darwin'): | 161 if try_es3 and sys.platform.startswith('darwin'): |
| 143 # Add all the tests again, this time with the | 162 # Add all the tests again, this time with the |
| 144 # --enable-unsafe-es3-apis command line argument. This has the | 163 # --enable-unsafe-es3-apis command line argument. This has the |
| 145 # side-effect of enabling the Core Profile rendering path on Mac | 164 # side-effect of enabling the Core Profile rendering path on Mac |
| 146 # OS. | 165 # OS. |
| 147 self._AddAllPages(expectations, base_name, True) | 166 self._AddAllPages(expectations, base_name, True) |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 312 story_set=self, | 331 story_set=self, |
| 313 shared_page_state_class=shared_page_state_class, | 332 shared_page_state_class=shared_page_state_class, |
| 314 expectations=expectations)) | 333 expectations=expectations)) |
| 315 | 334 |
| 316 @property | 335 @property |
| 317 def allow_mixed_story_states(self): | 336 def allow_mixed_story_states(self): |
| 318 # Return True here in order to be able to add the same tests with | 337 # Return True here in order to be able to add the same tests with |
| 319 # a different SharedPageState on Mac which tests them with the | 338 # a different SharedPageState on Mac which tests them with the |
| 320 # Core Profile rendering path. | 339 # Core Profile rendering path. |
| 321 return True | 340 return True |
| OLD | NEW |