Commit 51d83092 authored by manuk's avatar manuk Committed by Commit Bot

[omnibox] [rich-autocompletion] Mark params const ref in render_text.

Follow up on crrev.com/c/2108780.

Bug: 1062446
Change-Id: I742fdc3b8314bb717cde70e2d261b6fdb21b3936
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2213125Reviewed-by: default avatarEtienne Bergeron <etienneb@chromium.org>
Commit-Queue: manuk hovanesian <manukh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771848}
parent 489c1417
......@@ -2244,7 +2244,7 @@ internal::GraphemeIterator RenderText::GetGraphemeIteratorAtIndex(
}
void RenderText::DrawSelections(Canvas* canvas,
const std::vector<Range> selections) {
const std::vector<Range>& selections) {
for (auto selection : selections) {
if (!selection.is_empty()) {
for (Rect s : GetSubstringBounds(selection)) {
......
......@@ -737,7 +737,7 @@ class GFX_EXPORT RenderText {
// Draw all text and make the given ranges appear selected.
virtual void DrawVisualText(internal::SkiaTextRenderer* renderer,
const std::vector<Range> selections) = 0;
const std::vector<Range>& selections) = 0;
// Update the display text.
void UpdateDisplayText(float text_width);
......@@ -828,7 +828,7 @@ class GFX_EXPORT RenderText {
void UpdateCachedBoundsAndOffset();
// Draws the specified ranges of text with a selected appearance.
void DrawSelections(Canvas* canvas, const std::vector<Range> selections);
void DrawSelections(Canvas* canvas, const std::vector<Range>& selections);
// Returns a grapheme iterator that contains the codepoint at |index|.
internal::GraphemeIterator GetGraphemeIteratorAtIndex(
......
......@@ -1698,7 +1698,7 @@ void RenderTextHarfBuzz::EnsureLayout() {
}
void RenderTextHarfBuzz::DrawVisualText(internal::SkiaTextRenderer* renderer,
const std::vector<Range> selections) {
const std::vector<Range>& selections) {
DCHECK(!update_layout_run_list_);
DCHECK(!update_display_run_list_);
DCHECK(!update_display_text_);
......
......@@ -229,7 +229,7 @@ class GFX_EXPORT RenderTextHarfBuzz : public RenderText {
void OnDisplayTextAttributeChanged() override;
void EnsureLayout() override;
void DrawVisualText(internal::SkiaTextRenderer* renderer,
const std::vector<Range> selections) override;
const std::vector<Range>& selections) override;
private:
friend class test::RenderTextTestApi;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment