Go through the passed in list of attributes and register those renderers
        in the render map.
426933
def _register_renderers(self, attrs):
        
        for method in attrs:
            func = getattr(self, method)
            mimetypes = getattr(func, 'mimetypes', [])
            for mimetype in mimetypes:
                if not '/' in mimetype:
                    self.reject_map[mimetype] = func
                if mimetype not in self.render_map:
                    self.render_map[mimetype] = func
                else:
                    # about to redefine an already defined renderer.
                    # make sure this new render method is not on a base class.
                    base_classes = self.__class__.mro()[1:]
                    from_baseclass = any([x for x in base_classes if func.__name__ in dir(x)])
                    if not from_baseclass:
                        self.render_map[mimetype] = func
315706
private void registerRenderer(Object object)
	{
		//get the classes to use to render
		Pair<Class<? extends MalisisRenderer<?>>, Class<? extends MalisisRenderer<?>>> rendererClasses = getRendererClasses(object);
		if (rendererClasses == null)
			return;

		//get the block renderer
		MalisisRenderer<?> renderer = null;
		try
		{
			renderer = getRenderer(rendererClasses.getLeft());
		}
		catch (InstantiationException | IllegalAccessException e)
		{
			MalisisCore.log.error(	"[MalisisRegistry] Failed to load {} renderer for {}",
									rendererClasses.getLeft().getSimpleName(),
									object.getClass().getSimpleName(),
									e);
			return;
		}

		//register the block renderer
		if (object instanceof Block && renderer != null)
		{
			blockRenderers.put((Block) object, renderer);
			object = Item.getItemFromBlock((Block) object);
		}

		//get the item renderer
		try
		{
			renderer = getRenderer(rendererClasses.getRight());
		}
		catch (InstantiationException | IllegalAccessException e)
		{
			MalisisCore.log.error(	"[MalisisRegistry] Failed to load {} renderer for {}",
									rendererClasses.getLeft().getSimpleName(),
									object.getClass().getSimpleName());
			return;
		}

		//register the item renderer
		if (object != Items.AIR && renderer != null)
		{
			itemRenderers.put((Item) object, renderer);
		}
	}
285385
@Override
	public void registerLayerRenderer(Layer layer, LayerRenderer layerRenderer) {
		if (layerRenderers.containsKey(layer)) {
			layerRenderers.remove(layer);
		}
		layerRenderers.put(layer, layerRenderer);
	}
1118055
def get_renderers(self):
        
        try:
            source = self.get_object()
        except (ImproperlyConfigured, APIException):
            self.renderer_classes = [RENDERER_MAPPING[i] for i in self.__class__.renderers]
            return [RENDERER_MAPPING[i]() for i in self.__class__.renderers]
        else:
            self.renderer_classes = [RENDERER_MAPPING[i] for i in source.__class__.renderers]
            return [RENDERER_MAPPING[i]() for i in source.__class__.renderers]
1275597
function (enabled) {
    var renderer = this.sceneEl.renderer;
    this.shadowMapEnabled = this.data.enabled && enabled;
    if (renderer) {
      renderer.shadowMap.enabled = this.shadowMapEnabled;
    }
  }
790863
protected void registerSpinnerAttributes() {
        addAttributeProcessor(new SpinnerArrayLmlAttribute(), "items");
        addAttributeProcessor(new SpinnerDisabledLmlAttribute(), "disabled", "inputDisabled");
        addAttributeProcessor(new SpinnerNameLmlAttribute(), "selectorName", "text");
        addAttributeProcessor(new SpinnerPrecisionLmlAttribute(), "precision", "scale");
        addAttributeProcessor(new SpinnerProgrammaticChangeEventsLmlAttribute(), "programmaticChangeEvents");
        addAttributeProcessor(new SpinnerSelectedLmlAttribute(), "selected");
        addAttributeProcessor(new SpinnerTextFieldEventPolicyLmlAttribute(), "textFieldEventPolicy");
        addAttributeProcessor(new SpinnerWrapLmlAttribute(), "wrap");
    }
954474
private void registerMap(final MapWidget mapWidget) {
		if (mapWidget != null) {
			onLoadRegistration = mapWidget.getMapModel().addMapModelHandler(new MapModelHandler() {

				public void onMapModelChange(MapModelEvent event) {
					onLoadRegistration.removeHandler();
					view.onLoadStart();
					if (GwtCommandDispatcher.getInstance().isBusy()) {
						onDispatchStopRegistration = GwtCommandDispatcher.getInstance().addDispatchStoppedHandler(
								new DispatchStoppedHandler() {

									public void onDispatchStopped(DispatchStoppedEvent event) {
										fadeOut(mapWidget);
									}
								});
					} else {
						fadeOut(mapWidget);
					}
				}
			});
		}
	}
1193889
function MDRenderer(options) {
  this.options = options || {};

  this.options.renderer = new marked.Renderer();
  Object.keys(renderFunc).forEach(function(key) {
    this.options.renderer[key] = renderFunc[key];
  }, this);

  return this;
}
188712
protected void putCasResponseAttributesIntoModel(final Map<String, Object> model,
                                                     final Map<String, Object> attributes,
                                                     final RegisteredService registeredService,
                                                     final CasProtocolAttributesRenderer attributesRenderer) {

        LOGGER.trace("Beginning to encode attributes for the response");
        val encodedAttributes = this.protocolAttributeEncoder.encodeAttributes(attributes, registeredService);

        LOGGER.debug("Encoded attributes for the response are [{}]", encodedAttributes);
        putIntoModel(model, CasProtocolConstants.VALIDATION_CAS_MODEL_ATTRIBUTE_NAME_ATTRIBUTES, encodedAttributes);

        val formattedAttributes = attributesRenderer.render(encodedAttributes);
        putIntoModel(model, CasProtocolConstants.VALIDATION_CAS_MODEL_ATTRIBUTE_NAME_FORMATTED_ATTRIBUTES, formattedAttributes);
    }
548960
function (renderer) {

        var cache = this._cache;

        cache.use(renderer.__uid__);
        var chunks = cache.get('chunks');
        if (chunks) {
            for (var c = 0; c < chunks.length; c++) {
                var chunk = chunks[c];

                for (var k = 0; k < chunk.attributeBuffers.length; k++) {
                    var attribs = chunk.attributeBuffers[k];
                    renderer.gl.deleteBuffer(attribs.buffer);
                }

                if (chunk.indicesBuffer) {
                    renderer.gl.deleteBuffer(chunk.indicesBuffer.buffer);
                }
            }
        }
        if (this.__vaoCache) {
            var vaoExt = renderer.getGLExtension('OES_vertex_array_object');
            for (var id in this.__vaoCache) {
                var vao = this.__vaoCache[id].vao;
                if (vao) {
                    vaoExt.deleteVertexArrayOES(vao);
                }
            }
        }
        this.__vaoCache = {};
        cache.deleteContext(renderer.__uid__);
    }
948786
private void registerMandatoryAttributes(Attributes attributes) {
    // see https://sourceforge.net/p/jerichohtml/discussion/350024/thread/501a7d05/
    Map<String, String> attrs = context.getMandatoryAttributes();
    if (!attrs.isEmpty()) {
      for (Entry<String, String> i : attrs.entrySet()) {
        String v = i.getValue();
        if (v == null) {
          outputDocument.insert(attributes.getBegin(), " " + i.getKey() + " ");
        } else {
          outputDocument.insert(attributes.getBegin(), " " + i.getKey() + "\"" + v + "\" ");
        }
      }
    }
  }
1349449
def render(self, type, rerender=False):
        """"""
        for child in self.children:
            child.render(type, rerender)
105964
protected void render() {
		if (graphicsHandler.getHandlerGroup() != null) {
			invisibleClickArea = createInvisibleMask();
			invisibleClickArea.addDoubleClickHandler(this);
			invisibleClickArea.addClickHandler(this);
			invisibleClickArea.addMouseDownHandler(this);
			invisibleClickArea.addMouseUpHandler(this);
			invisibleClickArea.addMouseMoveHandler(this);
		}
	}
1119152
function (renderer, attribList, vao) {
        var _gl = renderer.gl;
        var program = this._program;

        var locationMap = this._locations;

        var enabledAttributeListInContext;
        if (vao) {
            enabledAttributeListInContext = vao.__enabledAttributeList;
        }
        else {
            enabledAttributeListInContext = enabledAttributeList[renderer.__uid__];
        }
        if (!enabledAttributeListInContext) {
            // In vertex array object context
            // PENDING Each vao object needs to enable attributes again?
            if (vao) {
                enabledAttributeListInContext
                    = vao.__enabledAttributeList
                    = [];
            }
            else {
                enabledAttributeListInContext
                    = enabledAttributeList[renderer.__uid__]
                    = [];
            }
        }
        var locationList = [];
        for (var i = 0; i < attribList.length; i++) {
            var symbol = attribList[i];
            if (!this.attributes[symbol]) {
                locationList[i] = -1;
                continue;
            }
            var location = locationMap[symbol];
            if (location == null) {
                location = _gl.getAttribLocation(program, symbol);
                // Attrib location is a number from 0 to ...
                if (location === -1) {
                    locationList[i] = -1;
                    continue;
                }
                locationMap[symbol] = location;
            }
            locationList[i] = location;

            if (!enabledAttributeListInContext[location]) {
                enabledAttributeListInContext[location] = SHADER_STATE_TO_ENABLE;
            }
            else {
                enabledAttributeListInContext[location] = SHADER_STATE_KEEP_ENABLE;
            }
        }

        for (var i = 0; i < enabledAttributeListInContext.length; i++) {
            switch(enabledAttributeListInContext[i]){
                case SHADER_STATE_TO_ENABLE:
                    _gl.enableVertexAttribArray(i);
                    enabledAttributeListInContext[i] = SHADER_STATE_PENDING;
                    break;
                case SHADER_STATE_KEEP_ENABLE:
                    enabledAttributeListInContext[i] = SHADER_STATE_PENDING;
                    break;
                // Expired
                case SHADER_STATE_PENDING:
                    _gl.disableVertexAttribArray(i);
                    enabledAttributeListInContext[i] = 0;
                    break;
            }
        }

        return locationList;
    }
501209
def GetRendererForValueOrClass(cls, value, limit_lists=-1):
    """"""

    if inspect.isclass(value):
      value_cls = value
    else:
      value_cls = value.__class__

    cache_key = "%s_%d" % (value_cls.__name__, limit_lists)
    try:
      renderer_cls = cls._renderers_cache[cache_key]
    except KeyError:
      candidates = []
      for candidate in itervalues(ApiValueRenderer.classes):
        if candidate.value_class:
          candidate_class = candidate.value_class
        else:
          continue

        if inspect.isclass(value):
          if issubclass(value_cls, candidate_class):
            candidates.append((candidate, candidate_class))
        else:
          if isinstance(value, candidate_class):
            candidates.append((candidate, candidate_class))

      if not candidates:
        raise RuntimeError(
            "No renderer found for value %s." % value.__class__.__name__)

      candidates = sorted(
          candidates, key=lambda candidate: len(candidate[1].mro()))
      renderer_cls = candidates[-1][0]
      cls._renderers_cache[cache_key] = renderer_cls

    return renderer_cls(limit_lists=limit_lists)
1317373
function Renderer(options) {
  options = options || {};
  this.MD   = new MDRenderer(options);
  this.CGMD = new CGMDRenderer(new MDRenderer(options));

  return this;
}
124123
function render(renderProperties, encodings, options) {
	encodings = linearizeEncodings(encodings);

	for (var i = 0; i < encodings.length; i++) {
		encodings[i].options = merge(options, encodings[i].options);
		fixOptions(encodings[i].options);
	}

	fixOptions(options);

	var Renderer = renderProperties.renderer;
	var renderer = new Renderer(renderProperties.element, encodings, options);
	renderer.render();

	if (renderProperties.afterRender) {
		renderProperties.afterRender();
	}
}