diff --git a/core/includes/common.inc b/core/includes/common.inc
index 323a666b89..f40565ab1c 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -896,7 +896,7 @@ function drupal_render_children(&$element, $children_keys = NULL) {
   $output = '';
   foreach ($children_keys as $key) {
     if (!empty($element[$key])) {
-      $output .= drupal_render($element[$key]);
+      $output .= \Drupal::service('renderer')->render($element[$key]);
     }
   }
   return Markup::create($output);
diff --git a/core/includes/tablesort.inc b/core/includes/tablesort.inc
index d8f1624313..b948fea69e 100644
--- a/core/includes/tablesort.inc
+++ b/core/includes/tablesort.inc
@@ -53,7 +53,7 @@ function tablesort_header(&$cell_content, array &$cell_attributes, array $header
         '#theme' => 'tablesort_indicator',
         '#style' => $ts['sort'],
       ];
-      $image = drupal_render($tablesort_indicator);
+      $image = \Drupal::service('renderer')->render($tablesort_indicator);
     }
     else {
       // If the user clicks a different header, we want to sort ascending initially.
diff --git a/core/lib/Drupal/Core/Render/Element/Tableselect.php b/core/lib/Drupal/Core/Render/Element/Tableselect.php
index a8f0e9596c..24eb431713 100644
--- a/core/lib/Drupal/Core/Render/Element/Tableselect.php
+++ b/core/lib/Drupal/Core/Render/Element/Tableselect.php
@@ -159,7 +159,7 @@ public static function preRenderTableselect($element) {
           $row += $element['#options'][$key]['#attributes'];
         }
         // Render the checkbox / radio element.
-        $row['data'][] = drupal_render($element[$key]);
+        $row['data'][] = \Drupal::service('renderer')->render($element[$key]);
 
         // As table.html.twig only maps header and row columns by order, create
         // the correct order by iterating over the header fields.
diff --git a/core/lib/Drupal/Core/Theme/ThemeManager.php b/core/lib/Drupal/Core/Theme/ThemeManager.php
index c58d176d45..61f0483363 100644
--- a/core/lib/Drupal/Core/Theme/ThemeManager.php
+++ b/core/lib/Drupal/Core/Theme/ThemeManager.php
@@ -303,7 +303,7 @@ public function render($hook, array $variables) {
       unset($preprocess_bubbleable['#cache']['keys']);
       if ($preprocess_bubbleable) {
         // @todo Inject the Renderer in https://www.drupal.org/node/2529438.
-        drupal_render($preprocess_bubbleable);
+        \Drupal::service('renderer')->render($preprocess_bubbleable);
       }
     }
 
diff --git a/core/modules/action/action.views_execution.inc b/core/modules/action/action.views_execution.inc
index 71b8eebe42..b9acfe9fc2 100644
--- a/core/modules/action/action.views_execution.inc
+++ b/core/modules/action/action.views_execution.inc
@@ -15,6 +15,6 @@ function action_views_form_substitutions() {
     '#attributes' => ['class' => ['action-table-select-all']],
   ];
   return [
-    '<!--action-bulk-form-select-all-->' => drupal_render($select_all),
+    '<!--action-bulk-form-select-all-->' => \Drupal::service('renderer')->render($select_all),
   ];
 }
diff --git a/core/modules/book/book.module b/core/modules/book/book.module
index 988201ee1e..d0aa9b0fef 100644
--- a/core/modules/book/book.module
+++ b/core/modules/book/book.module
@@ -437,7 +437,7 @@ function template_preprocess_book_navigation(&$variables) {
   }
 
   if (!empty($build)) {
-    drupal_render($build);
+    \Drupal::service('renderer')->render($build);
   }
 
   $variables['has_links'] = FALSE;
diff --git a/core/modules/book/src/Form/BookAdminEditForm.php b/core/modules/book/src/Form/BookAdminEditForm.php
index e91f52ea8b..1e7cdb4b95 100644
--- a/core/modules/book/src/Form/BookAdminEditForm.php
+++ b/core/modules/book/src/Form/BookAdminEditForm.php
@@ -220,7 +220,7 @@ protected function bookAdminTableTree(array $tree, array &$form) {
       }
 
       $form[$id]['title'] = [
-        '#prefix' => !empty($indentation) ? drupal_render($indentation) : '',
+        '#prefix' => !empty($indentation) ? \Drupal::service('renderer')->render($indentation) : '',
         '#type' => 'textfield',
         '#default_value' => $data['link']['title'],
         '#maxlength' => 255,
diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index 48e2ae9a3c..16949ffd9e 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -627,7 +627,7 @@ function template_preprocess_comment(&$variables) {
     '#theme' => 'username',
     '#account' => $account,
   ];
-  $variables['author'] = drupal_render($username);
+  $variables['author'] = \Drupal::service('renderer')->render($username);
   $variables['author_id'] = $comment->getOwnerId();
   $variables['new_indicator_timestamp'] = $comment->getChangedTime();
   $variables['created'] = format_date($comment->getCreatedTime());
@@ -673,7 +673,7 @@ function template_preprocess_comment(&$variables) {
       '#theme' => 'username',
       '#account' => $account_parent,
     ];
-    $variables['parent_author'] = drupal_render($username);
+    $variables['parent_author'] = \Drupal::service('renderer')->render($username);
     $variables['parent_created'] = format_date($comment_parent->getCreatedTime());
     // Avoid calling format_date() twice on the same timestamp.
     if ($comment_parent->getChangedTime() == $comment_parent->getCreatedTime()) {
diff --git a/core/modules/comment/src/Plugin/views/field/EntityLink.php b/core/modules/comment/src/Plugin/views/field/EntityLink.php
index 03e6f6c843..a2c6911942 100644
--- a/core/modules/comment/src/Plugin/views/field/EntityLink.php
+++ b/core/modules/comment/src/Plugin/views/field/EntityLink.php
@@ -72,7 +72,7 @@ public function render(ResultRow $values) {
     $entity = $this->getEntity($values);
 
     // Only render the links, if they are defined.
-    return !empty($this->build[$entity->id()]['links']['comment__comment']) ? drupal_render($this->build[$entity->id()]['links']['comment__comment']) : '';
+    return !empty($this->build[$entity->id()]['links']['comment__comment']) ? \Drupal::service('renderer')->render($this->build[$entity->id()]['links']['comment__comment']) : '';
   }
 
 }
diff --git a/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php b/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php
index fa24c3ffe8..f88c0498d3 100644
--- a/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php
+++ b/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php
@@ -70,7 +70,7 @@ public function render(ResultRow $values) {
         '#theme' => 'username',
         '#account' => $account,
       ];
-      return drupal_render($username);
+      return \Drupal::service('renderer')->render($username);
     }
     else {
       return $this->sanitizeValue($this->getValue($values));
diff --git a/core/modules/content_translation/content_translation.admin.inc b/core/modules/content_translation/content_translation.admin.inc
index f29a7e6556..bf33ba0af0 100644
--- a/core/modules/content_translation/content_translation.admin.inc
+++ b/core/modules/content_translation/content_translation.admin.inc
@@ -209,7 +209,7 @@ function _content_translation_preprocess_language_content_settings_table(&$varia
       $rows[] = [
         'data' => [
           [
-            'data' => drupal_render($field_element),
+            'data' => \Drupal::service('renderer')->render($field_element),
             'class' => ['translatable'],
           ],
           [
@@ -243,7 +243,7 @@ function _content_translation_preprocess_language_content_settings_table(&$varia
           $rows[] = [
             'data' => [
               [
-                'data' => drupal_render($column_element[$key]),
+                'data' => \Drupal::service('renderer')->render($column_element[$key]),
                 'class' => ['translatable'],
               ],
               [
diff --git a/core/modules/contextual/src/Plugin/views/field/ContextualLinks.php b/core/modules/contextual/src/Plugin/views/field/ContextualLinks.php
index 6bd5c01a43..09e4505953 100644
--- a/core/modules/contextual/src/Plugin/views/field/ContextualLinks.php
+++ b/core/modules/contextual/src/Plugin/views/field/ContextualLinks.php
@@ -138,7 +138,7 @@ public function render(ResultRow $values) {
         '#type' => 'contextual_links_placeholder',
         '#id' => _contextual_links_to_id($contextual_links),
       ];
-      return drupal_render($element);
+      return \Drupal::service('renderer')->render($element);
     }
     else {
       return '';
diff --git a/core/modules/file/file.field.inc b/core/modules/file/file.field.inc
index 80ffbe9979..a3b8868cd0 100644
--- a/core/modules/file/file.field.inc
+++ b/core/modules/file/file.field.inc
@@ -73,7 +73,7 @@ function template_preprocess_file_widget_multiple(&$variables) {
 
     // Render everything else together in a column, without the normal wrappers.
     $widget['#theme_wrappers'] = [];
-    $information = drupal_render($widget);
+    $information = \Drupal::service('renderer')->render($widget);
     $display = '';
     if ($element['#display_field']) {
       unset($widget['display']['#title']);
diff --git a/core/modules/filter/src/Plugin/Filter/FilterCaption.php b/core/modules/filter/src/Plugin/Filter/FilterCaption.php
index 62c8395036..03cddb7900 100644
--- a/core/modules/filter/src/Plugin/Filter/FilterCaption.php
+++ b/core/modules/filter/src/Plugin/Filter/FilterCaption.php
@@ -64,7 +64,7 @@ public function process($text, $langcode) {
           '#caption' => $caption,
           '#classes' => $classes,
         ];
-        $altered_html = drupal_render($filter_caption);
+        $altered_html = \Drupal::service('renderer')->render($filter_caption);
 
         // Load the altered HTML into a new DOMDocument and retrieve the element.
         $updated_nodes = Html::load($altered_html)->getElementsByTagName('body')
diff --git a/core/modules/filter/src/Plugin/Filter/FilterHtml.php b/core/modules/filter/src/Plugin/Filter/FilterHtml.php
index 882bcc0e16..6e800c3a52 100644
--- a/core/modules/filter/src/Plugin/Filter/FilterHtml.php
+++ b/core/modules/filter/src/Plugin/Filter/FilterHtml.php
@@ -422,7 +422,7 @@ public function tips($long = FALSE) {
       '#header' => $header,
       '#rows' => $rows,
     ];
-    $output .= drupal_render($table);
+    $output .= \Drupal::service('renderer')->render($table);
 
     $output .= '<p>' . $this->t('Most unusual characters can be directly entered without any problems.') . '</p>';
     $output .= '<p>' . $this->t('If you do encounter problems, try using HTML character entities. A common example looks like &amp;amp; for an ampersand &amp; character. For a full list of entities see HTML\'s <a href=":html-entities">entities</a> page. Some of the available characters include:', [':html-entities' => 'http://www.w3.org/TR/html4/sgml/entities.html']) . '</p>';
@@ -461,7 +461,7 @@ public function tips($long = FALSE) {
       '#header' => $header,
       '#rows' => $rows,
     ];
-    $output .= drupal_render($table);
+    $output .= \Drupal::service('renderer')->render($table);
     return $output;
   }
 
diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module
index c2de3c9e0b..51472cf8c5 100644
--- a/core/modules/forum/forum.module
+++ b/core/modules/forum/forum.module
@@ -460,12 +460,12 @@ function template_preprocess_forums(&$variables) {
           'name' => $topic->getOwner()->getDisplayName(),
           'created' => $topic->getCreatedTime(),
         ]];
-        $variables['topics'][$id]->submitted = drupal_render($forum_submitted);
+        $variables['topics'][$id]->submitted = \Drupal::service('renderer')->render($forum_submitted);
         $forum_submitted = [
           '#theme' => 'forum_submitted',
           '#topic' => isset($topic->last_reply) ? $topic->last_reply : NULL,
         ];
-        $variables['topics'][$id]->last_reply = drupal_render($forum_submitted);
+        $variables['topics'][$id]->last_reply = \Drupal::service('renderer')->render($forum_submitted);
 
         $variables['topics'][$id]->new_text = '';
         $variables['topics'][$id]->new_url = '';
@@ -569,7 +569,7 @@ function template_preprocess_forum_list(&$variables) {
       $variables['forums'][$id]->old_topics = $forum->num_topics - $variables['forums'][$id]->new_topics;
     }
     $forum_submitted = ['#theme' => 'forum_submitted', '#topic' => $forum->last_post];
-    $variables['forums'][$id]->last_reply = drupal_render($forum_submitted);
+    $variables['forums'][$id]->last_reply = \Drupal::service('renderer')->render($forum_submitted);
   }
 
   $variables['pager'] = [
@@ -636,7 +636,7 @@ function template_preprocess_forum_submitted(&$variables) {
   $variables['author'] = '';
   if (isset($variables['topic']->uid)) {
     $username = ['#theme' => 'username', '#account' => User::load($variables['topic']->uid)];
-    $variables['author'] = drupal_render($username);
+    $variables['author'] = \Drupal::service('renderer')->render($username);
   }
   $variables['time'] = isset($variables['topic']->created) ? \Drupal::service('date.formatter')->formatTimeDiffSince($variables['topic']->created) : '';
 }
diff --git a/core/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php b/core/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php
index f33dab25aa..3a8b22d00e 100644
--- a/core/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php
+++ b/core/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php
@@ -96,7 +96,7 @@ public function render(ResultRow $values) {
         '#theme' => 'mark',
         '#status' => $mark,
       ];
-      return $this->renderLink(drupal_render($build), $values);
+      return $this->renderLink(\Drupal::service('renderer')->render($build), $values);
     }
   }
 
diff --git a/core/modules/image/src/Form/ImageStyleEditForm.php b/core/modules/image/src/Form/ImageStyleEditForm.php
index 574d9145a8..1e242954b5 100644
--- a/core/modules/image/src/Form/ImageStyleEditForm.php
+++ b/core/modules/image/src/Form/ImageStyleEditForm.php
@@ -58,7 +58,7 @@ public function form(array $form, FormStateInterface $form_state) {
     $form['preview'] = [
       '#type' => 'item',
       '#title' => $this->t('Preview'),
-      '#markup' => drupal_render($preview_arguments),
+      '#markup' => \Drupal::service('renderer')->render($preview_arguments),
       // Render preview above parent elements.
       '#weight' => -5,
     ];
diff --git a/core/modules/node/node.admin.inc b/core/modules/node/node.admin.inc
index 6c3bb5fd3d..b96ee5aff6 100644
--- a/core/modules/node/node.admin.inc
+++ b/core/modules/node/node.admin.inc
@@ -173,7 +173,7 @@ function _node_mass_update_batch_finished($success, $results, $operations) {
       '#theme' => 'item_list',
       '#items' => $results,
     ];
-    $message .= drupal_render($item_list);
+    $message .= \Drupal::service('renderer')->render($item_list);
     drupal_set_message($message);
   }
 }
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index 466f510001..4e76edddd2 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -593,9 +593,9 @@ function template_preprocess_node(&$variables) {
   $variables['node'] = $variables['elements']['#node'];
   /** @var \Drupal\node\NodeInterface $node */
   $node = $variables['node'];
-  $variables['date'] = drupal_render($variables['elements']['created']);
+  $variables['date'] = \Drupal::service('renderer')->render($variables['elements']['created']);
   unset($variables['elements']['created']);
-  $variables['author_name'] = drupal_render($variables['elements']['uid']);
+  $variables['author_name'] = \Drupal::service('renderer')->render($variables['elements']['uid']);
   unset($variables['elements']['uid']);
 
   $variables['url'] = $node->url('canonical', [
diff --git a/core/modules/node/src/NodeListBuilder.php b/core/modules/node/src/NodeListBuilder.php
index 62666497e8..4dbdf27bf2 100644
--- a/core/modules/node/src/NodeListBuilder.php
+++ b/core/modules/node/src/NodeListBuilder.php
@@ -110,7 +110,7 @@ public function buildRow(EntityInterface $entity) {
     $row['title']['data'] = [
       '#type' => 'link',
       '#title' => $entity->label(),
-      '#suffix' => ' ' . drupal_render($mark),
+      '#suffix' => ' ' . \Drupal::service('renderer')->render($mark),
       '#url' => $uri,
     ];
     $row['type'] = node_get_type_label($entity);
diff --git a/core/modules/node/src/Plugin/Action/UnpublishByKeywordNode.php b/core/modules/node/src/Plugin/Action/UnpublishByKeywordNode.php
index c0081882ce..3709853335 100644
--- a/core/modules/node/src/Plugin/Action/UnpublishByKeywordNode.php
+++ b/core/modules/node/src/Plugin/Action/UnpublishByKeywordNode.php
@@ -24,7 +24,7 @@ class UnpublishByKeywordNode extends ConfigurableActionBase {
   public function execute($node = NULL) {
     foreach ($this->configuration['keywords'] as $keyword) {
       $elements = node_view(clone $node);
-      if (strpos(drupal_render($elements), $keyword) !== FALSE || strpos($node->label(), $keyword) !== FALSE) {
+      if (strpos(\Drupal::service('renderer')->render($elements), $keyword) !== FALSE || strpos($node->label(), $keyword) !== FALSE) {
         $node->setPublished(FALSE);
         $node->save();
         break;
diff --git a/core/modules/rdf/rdf.module b/core/modules/rdf/rdf.module
index 0afcb09186..8d4329884d 100644
--- a/core/modules/rdf/rdf.module
+++ b/core/modules/rdf/rdf.module
@@ -329,7 +329,7 @@ function rdf_preprocess_node(&$variables) {
       '#theme' => 'rdf_metadata',
       '#metadata' => [$date_attributes],
     ];
-    $variables['metadata'] = drupal_render($rdf_metadata);
+    $variables['metadata'] = \Drupal::service('renderer')->render($rdf_metadata);
   }
 
   // Adds RDFa markup annotating the number of comments a node has.
@@ -534,7 +534,7 @@ function rdf_preprocess_comment(&$variables) {
     if (!empty($variables['content']['comment_body']['#prefix'])) {
       $rdf_metadata['#suffix'] = $variables['content']['comment_body']['#prefix'];
     }
-    $variables['content']['comment_body']['#prefix'] = drupal_render($rdf_metadata);
+    $variables['content']['comment_body']['#prefix'] = \Drupal::service('renderer')->render($rdf_metadata);
   }
 }
 
diff --git a/core/modules/search/tests/modules/search_extra_type/src/Plugin/Search/SearchExtraTypeSearch.php b/core/modules/search/tests/modules/search_extra_type/src/Plugin/Search/SearchExtraTypeSearch.php
index d18ff1c925..899986ae60 100644
--- a/core/modules/search/tests/modules/search_extra_type/src/Plugin/Search/SearchExtraTypeSearch.php
+++ b/core/modules/search/tests/modules/search_extra_type/src/Plugin/Search/SearchExtraTypeSearch.php
@@ -81,7 +81,7 @@ public function buildResults() {
     $pager = [
       '#type' => 'pager',
     ];
-    $output['suffix']['#markup'] = '</ol>' . drupal_render($pager);
+    $output['suffix']['#markup'] = '</ol>' . \Drupal::service('renderer')->render($pager);
 
     return $output;
   }
diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module
index e5c67d3954..83d7feb699 100644
--- a/core/modules/simpletest/simpletest.module
+++ b/core/modules/simpletest/simpletest.module
@@ -445,20 +445,20 @@ function _simpletest_batch_operation($test_list_init, $test_id, &$context) {
       '#theme' => 'simpletest_result_summary',
       '#label' => t($test_results[$class]['#name'] . ':'),
     ];
-    array_unshift($items, drupal_render($class_test_result));
+    array_unshift($items, \Drupal::service('renderer')->render($class_test_result));
   }
   $context['message'] = t('Processed test @num of @max - %test.', ['%test' => $info['name'], '@num' => $max - $size, '@max' => $max]);
   $overall_results = $test_results + [
     '#theme' => 'simpletest_result_summary',
     '#label' => t('Overall results:'),
   ];
-  $context['message'] .= drupal_render($overall_results);
+  $context['message'] .= \Drupal::service('renderer')->render($overall_results);
 
   $item_list = [
     '#theme' => 'item_list',
     '#items' => $items,
   ];
-  $context['message'] .= drupal_render($item_list);
+  $context['message'] .= \Drupal::service('renderer')->render($item_list);
 
   // Save working values for the next iteration.
   $context['sandbox']['tests'] = $test_list;
diff --git a/core/modules/system/tests/modules/theme_test/theme_test.module b/core/modules/system/tests/modules/theme_test/theme_test.module
index 2e6f164733..6a701abee9 100644
--- a/core/modules/system/tests/modules/theme_test/theme_test.module
+++ b/core/modules/system/tests/modules/theme_test/theme_test.module
@@ -153,7 +153,7 @@ function template_preprocess_theme_test_render_element(&$variables) {
  *   - element: An associative array containing the properties of the element.
  */
 function theme_theme_test_render_element_children($variables) {
-  return drupal_render($variables['element']);
+  return \Drupal::service('renderer')->render($variables['element']);
 }
 
 /**
diff --git a/core/modules/taxonomy/src/Form/OverviewTerms.php b/core/modules/taxonomy/src/Form/OverviewTerms.php
index 0ccb24b49b..3811ee5fd8 100644
--- a/core/modules/taxonomy/src/Form/OverviewTerms.php
+++ b/core/modules/taxonomy/src/Form/OverviewTerms.php
@@ -227,7 +227,7 @@ public function buildForm(array $form, FormStateInterface $form_state, Vocabular
         ];
       }
       $form['terms'][$key]['term'] = [
-        '#prefix' => !empty($indentation) ? drupal_render($indentation) : '',
+        '#prefix' => !empty($indentation) ? \Drupal::service('renderer')->render($indentation) : '',
         '#type' => 'link',
         '#title' => $term->getName(),
         '#url' => $term->urlInfo(),
diff --git a/core/modules/update/src/Form/UpdateManagerUpdate.php b/core/modules/update/src/Form/UpdateManagerUpdate.php
index 62572d60d3..60f506af04 100644
--- a/core/modules/update/src/Form/UpdateManagerUpdate.php
+++ b/core/modules/update/src/Form/UpdateManagerUpdate.php
@@ -69,7 +69,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
       '#last' => $this->state->get('update.last_check') ?: 0,
     ];
     $form['last_check'] = [
-      '#markup' => drupal_render($last_markup),
+      '#markup' => \Drupal::service('renderer')->render($last_markup),
     ];
 
     if (!_update_manager_check_backends($form, 'update')) {
diff --git a/core/modules/update/update.manager.inc b/core/modules/update/update.manager.inc
index d9067f4a12..399694f2c7 100644
--- a/core/modules/update/update.manager.inc
+++ b/core/modules/update/update.manager.inc
@@ -53,7 +53,7 @@ function update_manager_download_batch_finished($success, $results) {
       '#title' => t('Downloading updates failed:'),
       '#items' => $results['errors'],
     ];
-    drupal_set_message(drupal_render($item_list), 'error');
+    drupal_set_message(\Drupal::service('renderer')->render($item_list), 'error');
   }
   elseif ($success) {
     drupal_set_message(t('Updates downloaded successfully.'));
diff --git a/core/modules/views/src/Analyzer.php b/core/modules/views/src/Analyzer.php
index a5de193ded..a6a8d56bf4 100644
--- a/core/modules/views/src/Analyzer.php
+++ b/core/modules/views/src/Analyzer.php
@@ -77,7 +77,7 @@ public function formatMessages(array $messages) {
           '#theme' => 'item_list',
           '#items' => $messages,
         ];
-        $message = drupal_render($item_list);
+        $message = \Drupal::service('renderer')->render($item_list);
       }
       elseif ($messages) {
         $message = array_shift($messages);
diff --git a/core/modules/views/src/Plugin/views/area/Result.php b/core/modules/views/src/Plugin/views/area/Result.php
index d2f1b01ab6..2bbd23bb24 100644
--- a/core/modules/views/src/Plugin/views/area/Result.php
+++ b/core/modules/views/src/Plugin/views/area/Result.php
@@ -47,7 +47,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) {
         '@page_count -- the total page count',
       ],
     ];
-    $list = drupal_render($item_list);
+    $list = \Drupal::service('renderer')->render($item_list);
     $form['content'] = [
       '#title' => $this->t('Display'),
       '#type' => 'textarea',
diff --git a/core/modules/views/src/Plugin/views/field/PrerenderList.php b/core/modules/views/src/Plugin/views/field/PrerenderList.php
index f851cbb6a0..f27973ebbf 100644
--- a/core/modules/views/src/Plugin/views/field/PrerenderList.php
+++ b/core/modules/views/src/Plugin/views/field/PrerenderList.php
@@ -90,7 +90,7 @@ public function renderItems($items) {
           '#list_type' => $this->options['type'],
         ];
       }
-      return drupal_render($render);
+      return \Drupal::service('renderer')->render($render);
     }
   }
 
diff --git a/core/modules/views/views.module b/core/modules/views/views.module
index f6b4f79f9e..453c90bd79 100644
--- a/core/modules/views/views.module
+++ b/core/modules/views/views.module
@@ -614,7 +614,7 @@ function views_pre_render_views_form_views_form($element) {
     $row_id = $substitution['row_id'];
 
     $search[] = $substitution['placeholder'];
-    $replace[] = isset($element[$field_name][$row_id]) ? drupal_render($element[$field_name][$row_id]) : '';
+    $replace[] = isset($element[$field_name][$row_id]) ? \Drupal::service('renderer')->render($element[$field_name][$row_id]) : '';
   }
   // Add in substitutions from hook_views_form_substitutions().
   $substitutions = \Drupal::moduleHandler()->invokeAll('views_form_substitutions');
@@ -628,7 +628,7 @@ function views_pre_render_views_form_views_form($element) {
   }
 
   // Apply substitutions to the rendered output.
-  $output = str_replace($search, $replace, drupal_render($element['output']));
+  $output = str_replace($search, $replace, \Drupal::service('renderer')->render($element['output']));
   $element['output'] = ['#markup' => ViewsRenderPipelineMarkup::create($output)];
 
   return $element;
diff --git a/core/modules/views_ui/src/Form/BreakLockForm.php b/core/modules/views_ui/src/Form/BreakLockForm.php
index 94a626f273..b73e618cc2 100644
--- a/core/modules/views_ui/src/Form/BreakLockForm.php
+++ b/core/modules/views_ui/src/Form/BreakLockForm.php
@@ -74,7 +74,7 @@ public function getDescription() {
       '#theme' => 'username',
       '#account' => $account,
     ];
-    return $this->t('By breaking this lock, any unsaved changes made by @user will be lost.', ['@user' => drupal_render($username)]);
+    return $this->t('By breaking this lock, any unsaved changes made by @user will be lost.', ['@user' => \Drupal::service('renderer')->render($username)]);
   }
 
   /**
diff --git a/core/modules/views_ui/src/ViewEditForm.php b/core/modules/views_ui/src/ViewEditForm.php
index 67d1229555..fe3d86fc66 100644
--- a/core/modules/views_ui/src/ViewEditForm.php
+++ b/core/modules/views_ui/src/ViewEditForm.php
@@ -129,7 +129,7 @@ public function form(array $form, FormStateInterface $form_state) {
         '#account' => $this->entityManager->getStorage('user')->load($view->lock->owner),
       ];
       $lock_message_substitutions = [
-        '@user' => drupal_render($username),
+        '@user' => \Drupal::service('renderer')->render($username),
         '@age' => $this->dateFormatter->formatTimeDiffSince($view->lock->updated),
         ':url' => $view->url('break-lock-form'),
       ];
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php b/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php
index 3e1ee407ec..0666367c21 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php
@@ -46,7 +46,7 @@ public function testBubblingWithoutPreRender() {
     $element = [
       '#type' => 'container',
       '#cache' => [
-        'keys' => ['simpletest', 'drupal_render', 'children_attached'],
+        'keys' => ['simpletest', 'renderer', 'children_attached'],
       ],
       '#attached' => ['library' => ['test/parent']],
       '#title' => 'Parent',
@@ -68,7 +68,7 @@ public function testBubblingWithoutPreRender() {
 
     // Load the element from cache and verify the presence of the #attached
     // JavaScript.
-    $element = ['#cache' => ['keys' => ['simpletest', 'drupal_render', 'children_attached']]];
+    $element = ['#cache' => ['keys' => ['simpletest', 'renderer', 'children_attached']]];
     $this->assertTrue(strlen($this->renderer->renderRoot($element)) > 0, 'The element was retrieved from cache.');
     $this->assertEquals($element['#attached']['library'], $expected_libraries, 'The element, child and subchild #attached libraries are included.');
   }
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php
index 00426c252d..a92c363619 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php
@@ -996,7 +996,7 @@ public function testRenderChildrenPlaceholdersDifferentArguments() {
     $this->assertSame($element['#attached']['drupalSettings'], $expected_js_settings, '#attached is modified; both the original JavaScript setting and the ones added by each placeholder #lazy_builder callback exist.');
 
     // GET request: validate cached data.
-    $cached_element = $this->memoryCache->get('simpletest:drupal_render:children_placeholders')->data;
+    $cached_element = $this->memoryCache->get('simpletest:renderer:children_placeholders')->data;
     $expected_element = [
       '#attached' => [
         'drupalSettings' => [
@@ -1066,7 +1066,7 @@ protected function generatePlaceholdersWithChildrenTestElement(array $args_1, ar
     $test_element = [
       '#type' => 'details',
       '#cache' => [
-        'keys' => ['simpletest', 'drupal_render', 'children_placeholders'],
+        'keys' => ['simpletest', 'renderer', 'children_placeholders'],
       ],
       '#title' => 'Parent',
       '#attached' => [
