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

Unified Diff: content/test/gpu/page_sets/pixel_tests.py

Issue 1752083003: mac: Use IOSurfaces in Canvas2DLayerBridge. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp36_canvas2d_refactor
Patch Set: Rebase. Group macros. Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: content/test/gpu/page_sets/pixel_tests.py
diff --git a/content/test/gpu/page_sets/pixel_tests.py b/content/test/gpu/page_sets/pixel_tests.py
index 0f7ae64b16add1ec115385971b47ba4bf0baf7b0..4b1d3f185e3df19f923900f3b22c8663a5513a8c 100644
--- a/content/test/gpu/page_sets/pixel_tests.py
+++ b/content/test/gpu/page_sets/pixel_tests.py
@@ -36,6 +36,15 @@ class PixelTestsES3SharedPageState(gpu_test_base.GpuSharedPageState):
['--enable-unsafe-es3-apis'])
+class IOSurface2DCanvasSharedPageState(gpu_test_base.GpuSharedPageState):
+ def __init__(self, test, finder_options, story_set):
+ super(IOSurface2DCanvasSharedPageState, self).__init__(
+ test, finder_options, story_set)
+ finder_options.browser_options.AppendExtraBrowserArgs(
+ ['--enable-accelerated-2d-canvas',
+ '--disable-display-list-2d-canvas'])
+
+
class PixelTestsStorySet(story_set_module.StorySet):
""" Some basic test cases for GPU. """
@@ -52,6 +61,17 @@ class PixelTestsStorySet(story_set_module.StorySet):
# OS.
self._AddAllPages(expectations, base_name, True)
+ # On OS X, test the IOSurface 2D Canvas compositing path.
+ if sys.platform.startswith('darwin'):
+ self.AddStory(PixelTestsPage(
+ url='file://../../data/gpu/pixel_canvas2d_accelerated.html',
+ name=base_name + '.IOSurface2DCanvas',
+ test_rect=[0, 0, 400, 400],
+ revision=1,
+ story_set=self,
+ shared_page_state_class=IOSurface2DCanvasSharedPageState,
+ expectations=expectations))
+
def _AddAllPages(self, expectations, base_name, use_es3):
if use_es3:
es3_suffix = 'ES3'

Powered by Google App Engine
This is Rietveld 408576698