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

Side by Side 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, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | gpu/config/software_rendering_list_json.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 import sys 4 import sys
5 from telemetry.story import story_set as story_set_module 5 from telemetry.story import story_set as story_set_module
6 from telemetry.page import page_test 6 from telemetry.page import page_test
7 7
8 from gpu_tests import gpu_test_base 8 from gpu_tests import gpu_test_base
9 9
10 class GpuProcessSharedPageState(gpu_test_base.GpuSharedPageState): 10 class GpuProcessSharedPageState(gpu_test_base.GpuSharedPageState):
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 name='GpuProcess.identify_active_gpu4', 360 name='GpuProcess.identify_active_gpu4',
361 page_set=story_set, 361 page_set=story_set,
362 shared_page_state_class=IdentifyActiveGpuSharedPageState4, 362 shared_page_state_class=IdentifyActiveGpuSharedPageState4,
363 expectations=expectations, 363 expectations=expectations,
364 active_gpu=active_gpu, 364 active_gpu=active_gpu,
365 inactive_gpus=inactive_gpus) 365 inactive_gpus=inactive_gpus)
366 366
367 def Validate(self, tab, results): 367 def Validate(self, tab, results):
368 super(IdentifyActiveGpuPage4, self).Validate(tab, results) 368 super(IdentifyActiveGpuPage4, self).Validate(tab, results)
369 369
370
371 class ReadbackWebGLGpuProcessSharedPageState(GpuProcessSharedPageState):
372 def __init__(self, test, finder_options, story_set):
373 super(ReadbackWebGLGpuProcessSharedPageState, self).__init__(
374 test, finder_options, story_set)
375 options = finder_options.browser_options
376
377 if sys.platform.startswith('linux'):
378 # Hit id 110 from kSoftwareRenderingListJson.
379 options.AppendExtraBrowserArgs('--gpu-testing-vendor-id=0x10de')
380 options.AppendExtraBrowserArgs('--gpu-testing-device-id=0x0de1')
381 options.AppendExtraBrowserArgs('--gpu-testing-gl-vendor=VMware')
382 options.AppendExtraBrowserArgs('--gpu-testing-gl-renderer=Gallium 0.4 ' \
383 'on llvmpipe (LLVM 3.4, 256 bits)')
384 options.AppendExtraBrowserArgs('--gpu-testing-gl-version="3.0 Mesa 11.2"')
385
386 class ReadbackWebGLGpuProcessPage(gpu_test_base.PageBase):
387 def __init__(self, story_set, expectations):
388 super(ReadbackWebGLGpuProcessPage, self).__init__(
389 url='chrome:gpu',
390 name='GpuProcess.readback_webgl_gpu_process',
391 page_set=story_set,
392 shared_page_state_class=ReadbackWebGLGpuProcessSharedPageState,
393 expectations=expectations)
394
395 def Validate(self, tab, results):
396 if sys.platform.startswith('linux'):
397 feature_status_js = 'browserBridge.gpuInfo.featureStatus.featureStatus'
398 feature_status_list = tab.EvaluateJavaScript(feature_status_js)
399 result = True
400 for name, status in feature_status_list.items():
401 if name == 'multiple_raster_threads':
402 result = result and status == 'enabled_on'
403 elif name == 'native_gpu_memory_buffers':
404 result = result and status == 'disabled_software'
405 elif name == 'webgl':
406 result = result and status == 'enabled_readback'
407 else:
408 result = result and status == 'unavailable_software'
409 if not result:
410 raise page_test.Failure('WebGL readback setup failed: %s' \
411 % feature_status_list)
412
370 class GpuProcessTestsStorySet(story_set_module.StorySet): 413 class GpuProcessTestsStorySet(story_set_module.StorySet):
371 414
372 """ Tests that accelerated content triggers the creation of a GPU process """ 415 """ Tests that accelerated content triggers the creation of a GPU process """
373 416
374 def __init__(self, expectations): 417 def __init__(self, expectations):
375 super(GpuProcessTestsStorySet, self).__init__( 418 super(GpuProcessTestsStorySet, self).__init__(
376 serving_dirs=set(['../../../../content/test/data'])) 419 serving_dirs=set(['../../../../content/test/data']))
377 420
378 urls_and_names_list = [ 421 urls_and_names_list = [
379 ('file://../../data/gpu/functional_canvas_demo.html', 422 ('file://../../data/gpu/functional_canvas_demo.html',
(...skipping 10 matching lines...) Expand all
390 self.AddStory(FunctionalVideoPage(self, expectations)) 433 self.AddStory(FunctionalVideoPage(self, expectations))
391 self.AddStory(GpuInfoCompletePage(self, expectations)) 434 self.AddStory(GpuInfoCompletePage(self, expectations))
392 self.AddStory(NoGpuProcessPage(self, expectations)) 435 self.AddStory(NoGpuProcessPage(self, expectations))
393 self.AddStory(SoftwareGpuProcessPage(self, expectations)) 436 self.AddStory(SoftwareGpuProcessPage(self, expectations))
394 self.AddStory(SkipGpuProcessPage(self, expectations)) 437 self.AddStory(SkipGpuProcessPage(self, expectations))
395 self.AddStory(DriverBugWorkaroundsInGpuProcessPage(self, expectations)) 438 self.AddStory(DriverBugWorkaroundsInGpuProcessPage(self, expectations))
396 self.AddStory(IdentifyActiveGpuPage1(self, expectations)) 439 self.AddStory(IdentifyActiveGpuPage1(self, expectations))
397 self.AddStory(IdentifyActiveGpuPage2(self, expectations)) 440 self.AddStory(IdentifyActiveGpuPage2(self, expectations))
398 self.AddStory(IdentifyActiveGpuPage3(self, expectations)) 441 self.AddStory(IdentifyActiveGpuPage3(self, expectations))
399 self.AddStory(IdentifyActiveGpuPage4(self, expectations)) 442 self.AddStory(IdentifyActiveGpuPage4(self, expectations))
443 self.AddStory(ReadbackWebGLGpuProcessPage(self, expectations))
400 444
401 @property 445 @property
402 def allow_mixed_story_states(self): 446 def allow_mixed_story_states(self):
403 # Return True here in order to be able to run pages with different browser 447 # Return True here in order to be able to run pages with different browser
404 # command line arguments. 448 # command line arguments.
405 return True 449 return True
OLDNEW
« 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