(self,
               max_width,
               max_height,
               render_executor_class=executor.RenderExecutor)
Initializes this context.
Initializes this context.
Initializes this context .
def __init__(self,
               max_width,
               max_height,
               render_executor_class=executor.RenderExecutor):
    """Initializes this context."""
    logging.debug('Using render executor class: %s',
                  render_executor_class.__name__)
    self._render_executor = render_executor_class()
    self._refcount = 0

    self_weakref = weakref.ref(self)
    def _free_at_exit():
      if self_weakref():
        self_weakref()._free_unconditionally()  # pylint: disable=protected-access
    atexit.register(_free_at_exit)

    with self._render_executor.execution_context() as ctx:
      ctx.call(self._platform_init, max_width, max_height)
def __init__ ( self , max_width , max_height , render_executor_class = executor . RenderExecutor ) : logging . debug ( 'Using render executor class: %s' , render_executor_class . __name__ ) self . _render_executor = render_executor_class ( ) self . _refcount = 0 self_weakref = weakref . ref ( self ) def _free_at_exit ( ) : if self_weakref ( ) : self_weakref ( ) . _free_unconditionally ( ) # pylint: disable=protected-access atexit . register ( _free_at_exit ) with self . _render_executor . execution_context ( ) as ctx : ctx . call ( self . _platform_init , max_width , max_height )