class_docstr: OSMesa backend for Canvas
class_docstr_tok: ["OSMesa","backend","for","Canvas"]
code: def __init__(self, vispy_canvas, **kwargs):
      BaseCanvasBackend.__init__(self, vispy_canvas)
      # We use _process_backend_kwargs() to "serialize" the kwargs
      # and to check whether they match this backend's capability
      p = self._process_backend_kwargs(kwargs)
  
      # Deal with config
      # TODO: We do not support setting config
      # ... use context.config
      # Deal with context
      p.context.shared.add_ref("osmesa", self)
      if p.context.shared.ref is self:
          self._native_context = OSMesaContext()
      else:
          self._native_context = p.context.shared.ref._native_context
  
      self._closed = False
      self._pixels = None
      self._vispy_set_size(*p.size)
      _VP_OSMESA_ALL_WINDOWS.append(self)
  
      self._vispy_canvas.set_current()
      self._vispy_canvas.events.initialize()
  
imports: from __future__ import division
  from ...util.ptime import time
  from ..base import BaseApplicationBackend, BaseCanvasBackend, BaseTimerBackend
  from ...gloo import gl
  from time import sleep
label_desc: Use image node_id 1 to create a new CanvasBackend object from inherited base classes: BaseCanvasBackend with example: obj = CanvasBackend(vispy_canvas)