#NEWLINE# def _update_texture( self , buf ) : #NEWLINE# #INDENT# size = None #NEWLINE# caps = buf . get_caps ( ) #NEWLINE# _s = caps . get_structure ( 0 ) #NEWLINE# size = ( _s [ 'width' ] , _s [ 'height' ] ) #NEWLINE# if ( not buf . _texture ) : #NEWLINE# #INDENT# self . _texture = Texture . create ( size = size , colorfmt = 'rgb' ) #NEWLINE# self . _texture . flip_vertical ( ) #NEWLINE# self . dispatch ( 'on_load' ) #NEWLINE# #UNINDENT# if self . _texture : #NEWLINE# #INDENT# self . _texture . blit_buffer ( buf . data , size = size , colorfmt = 'rgb' )