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

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: Added back line removed by mistake and just rebase 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
« no previous file with comments | « no previous file | gpu/config/software_rendering_list_json.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 feb85a33233efc675b5048513e60be869555486f..84207c628e64105a0beab6d408cd356c1d1163ef 100644
--- a/content/test/gpu/page_sets/gpu_process_tests.py
+++ b/content/test/gpu/page_sets/gpu_process_tests.py
@@ -367,6 +367,49 @@ class IdentifyActiveGpuPage4(IdentifyActiveGpuPageBase):
def Validate(self, tab, results):
super(IdentifyActiveGpuPage4, self).Validate(tab, results)
+
+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 """
@@ -397,6 +440,7 @@ class GpuProcessTestsStorySet(story_set_module.StorySet):
self.AddStory(IdentifyActiveGpuPage2(self, expectations))
self.AddStory(IdentifyActiveGpuPage3(self, expectations))
self.AddStory(IdentifyActiveGpuPage4(self, expectations))
+ self.AddStory(ReadbackWebGLGpuProcessPage(self, expectations))
@property
def allow_mixed_story_states(self):
« no previous file with comments | « no previous file | gpu/config/software_rendering_list_json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698