drupal_render() was marked as deprecated, though its still called in quite some places.
All the child issues are closed as duplicates of this issue. Create a single patch for this issue instead of many sub-issues.
- Avoid rendering manually by letting the template who is printing the variable render it.
- Inject the renderer service into service, which uses drupal_render()
- Use \Drupal::service('renderer')->render() for old prodecural code.
- Replace drupal_render_root() with $renderer->renderRoot().
In 8.1.x, begin with a single patch to replace
drupal_render() with use of the renderer service. Rest TBD.
User interface changes