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

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

Issue 1548893004: Allow WebGL readback for Mesa llvmpipe driver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Only allow WebGL feature Created 4 years, 8 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/gpu_process_tests.py
diff --git a/content/test/gpu/page_sets/gpu_process_tests.py b/content/test/gpu/page_sets/gpu_process_tests.py
index 04fd7cc43f1e5b31b12d91f8ebec0ca2ddc01fdb..9d6f8f252578f9964f0712fe507719fa8cac602b 100644
--- a/content/test/gpu/page_sets/gpu_process_tests.py
+++ b/content/test/gpu/page_sets/gpu_process_tests.py
@@ -205,6 +205,50 @@ class DriverBugWorkaroundsInGpuProcessPage(gpu_test_base.PageBase):
raise page_test.Failure('%s missing in GPU process workarounds: %s' \
% (workaround, gpu_list))
+
+class ReadbackWebGLGpuProcessSharedPageState(GpuProcessSharedPageState):
+ def __init__(self, test, finder_options, story_set):
+ super(ReadbackWebGLGpuProcessSharedPageState, self).__init__(
+ test, finder_options, story_set)
+ options = finder_options.browser_options
+
+ if sys.platform.startswith('linux'):
+ # Hit id 110 from kSoftwareRenderingListJson.
+ options.AppendExtraBrowserArgs('--gpu-testing-vendor-id=0x10de')
+ options.AppendExtraBrowserArgs('--gpu-testing-device-id=0x0de1')
+ options.AppendExtraBrowserArgs('--gpu-testing-gl-vendor=VMware')
+ options.AppendExtraBrowserArgs('--gpu-testing-gl-renderer=Gallium 0.4 ' \
+ 'on llvmpipe (LLVM 3.4, 256 bits)')
+ options.AppendExtraBrowserArgs('--gpu-testing-gl-version="3.0 Mesa 11.2"')
+
+class ReadbackWebGLGpuProcessPage(gpu_test_base.PageBase):
+ def __init__(self, story_set, expectations):
+ super(ReadbackWebGLGpuProcessPage, self).__init__(
+ url='chrome:gpu',
+ name='GpuProcess.readback_webgl_gpu_process',
+ page_set=story_set,
+ shared_page_state_class=ReadbackWebGLGpuProcessSharedPageState,
+ expectations=expectations)
+
+ def Validate(self, tab, results):
+ if sys.platform.startswith('linux'):
+ feature_status_js = 'browserBridge.gpuInfo.featureStatus.featureStatus'
+ feature_status_list = tab.EvaluateJavaScript(feature_status_js)
+ result = True
+ for name, status in feature_status_list.items():
+ if name == 'multiple_raster_threads':
+ result = result and status == 'enabled_on'
+ elif name == 'native_gpu_memory_buffers':
+ result = result and status == 'disabled_software'
+ elif name == 'webgl':
+ result = result and status == 'enabled_readback'
+ else:
+ result = result and status == 'unavailable_software'
+ if not result:
+ raise page_test.Failure('WebGL readback setup failed: %s' \
+ % feature_status_list)
+
+
class GpuProcessTestsStorySet(story_set_module.StorySet):
""" Tests that accelerated content triggers the creation of a GPU process """
@@ -231,6 +275,7 @@ class GpuProcessTestsStorySet(story_set_module.StorySet):
self.AddStory(SoftwareGpuProcessPage(self, expectations))
self.AddStory(SkipGpuProcessPage(self, expectations))
self.AddStory(DriverBugWorkaroundsInGpuProcessPage(self, expectations))
+ self.AddStory(ReadbackWebGLGpuProcessPage(self, expectations))
@property
def allow_mixed_story_states(self):

Powered by Google App Engine
This is Rietveld 408576698