content/test/gpu/gpu_tests/trace_integration_test.py
def _EvaluateSuccess_CheckMainSwapChainPath(self, category, event_iterator,
                                              other_args):
    """Verified that Chrome's main swap chain is presented with full damage."""
    os_name = self.browser.platform.GetOSName()
    assert os_name and os_name.lower() == 'win'

    overlay_bot_config = self.GetOverlayBotConfig()
    if overlay_bot_config is None:
      self.fail('Overlay bot config can not be determined')
    assert overlay_bot_config.get('direct_composition', False)

    expect_full_damage = other_args and other_args.get('full_damage', False)

    partial_damage_encountered = False
    full_damage_encountered = False
    # Verify expectations through captured trace events.
    for event in event_iterator:
      if event.category != category:
        continue
      if event.name != _PRESENT_MAIN_SWAP_CHAIN_EVENT_NAME:
        continue
      dirty_rect = event.args.get('dirty_rect', None)
      if dirty_rect is None:
        continue
      if dirty_rect == 'full_damage':
        full_damage_encountered = True
      else:
        partial_damage_encountered = True

    # Today Chrome either run with full damage or partial damage, but not both.
    # This may change in the future.
    if (expect_full_damage != full_damage_encountered
        or expect_full_damage == partial_damage_encountered):
      self.fail('Expected events with name %s of %s, got others' %
                (_PRESENT_MAIN_SWAP_CHAIN_EVENT_NAME,
                 'full damage' if expect_full_damage else 'partial damage'))
Verified that Chrome's main swap chain is presented with full damage.
Verified that Chrome's main swap chain is presented with full damage.
Verified that Chrome ' s main swap chain is presented with full damage .
def _EvaluateSuccess_CheckMainSwapChainPath(self, category, event_iterator,
                                              other_args):
    os_name = self.browser.platform.GetOSName()
    assert os_name and os_name.lower() == 'win'
    overlay_bot_config = self.GetOverlayBotConfig()
    if overlay_bot_config is None:
      self.fail('Overlay bot config can not be determined')
    assert overlay_bot_config.get('direct_composition', False)
    expect_full_damage = other_args and other_args.get('full_damage', False)
    partial_damage_encountered = False
    full_damage_encountered = False
    for event in event_iterator:
      if event.category != category:
        continue
      if event.name != _PRESENT_MAIN_SWAP_CHAIN_EVENT_NAME:
        continue
      dirty_rect = event.args.get('dirty_rect', None)
      if dirty_rect is None:
        continue
      if dirty_rect == 'full_damage':
        full_damage_encountered = True
      else:
        partial_damage_encountered = True
    if (expect_full_damage != full_damage_encountered
        or expect_full_damage == partial_damage_encountered):
      self.fail('Expected events with name %s of %s, got others' %
                (_PRESENT_MAIN_SWAP_CHAIN_EVENT_NAME,
                 'full damage' if expect_full_damage else 'partial damage'))
def _EvaluateSuccess_CheckMainSwapChainPath ( self , category , event_iterator , other_args ) : os_name = self . browser . platform . GetOSName ( ) assert os_name and os_name . lower ( ) == 'win' overlay_bot_config = self . GetOverlayBotConfig ( ) if overlay_bot_config is None : self . fail ( 'Overlay bot config can not be determined' ) assert overlay_bot_config . get ( 'direct_composition' , False ) expect_full_damage = other_args and other_args . get ( 'full_damage' , False ) partial_damage_encountered = False full_damage_encountered = False for event in event_iterator : if event . category != category : continue if event . name != _PRESENT_MAIN_SWAP_CHAIN_EVENT_NAME : continue dirty_rect = event . args . get ( 'dirty_rect' , None ) if dirty_rect is None : continue if dirty_rect == 'full_damage' : full_damage_encountered = True else : partial_damage_encountered = True if ( expect_full_damage != full_damage_encountered or expect_full_damage == partial_damage_encountered ) : self . fail ( 'Expected events with name %s of %s, got others' % ( _PRESENT_MAIN_SWAP_CHAIN_EVENT_NAME , 'full damage' if expect_full_damage else 'partial damage' ) )
Verified that Chrome's main swap chain is presented with full damage.
Verified that Chrome ' s main swap chain is presented with full damage .
"""Verified that Chrome's main swap chain is presented with full damage.""" # Verify expectations through captured trace events. # Today Chrome either run with full damage or partial damage, but not both. # This may change in the future.
self
category
event_iterator
other_args