Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(966)

Unified Diff: ui/gfx/render_text_harfbuzz.h

Issue 2379033004: Optimize some code in RenderTextHarfbuzz. (Closed)
Patch Set: Nits & git cl format Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/gfx/render_text_harfbuzz.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text_harfbuzz.h
diff --git a/ui/gfx/render_text_harfbuzz.h b/ui/gfx/render_text_harfbuzz.h
index 43eae06c647cb469e9be2e60f95a2d656af95356..d7f171fb11dfc2cbd562e5394368c387513667d1 100644
--- a/ui/gfx/render_text_harfbuzz.h
+++ b/ui/gfx/render_text_harfbuzz.h
@@ -27,6 +27,7 @@ namespace gfx {
class Range;
class RangeF;
+class RenderTextHarfBuzz;
namespace internal {
@@ -52,8 +53,7 @@ struct GFX_EXPORT TextRunHarfBuzz {
void GetClusterAt(size_t pos, Range* chars, Range* glyphs) const;
// Returns the grapheme bounds at |text_index|. Handles multi-grapheme glyphs.
- RangeF GetGraphemeBounds(base::i18n::BreakIterator* grapheme_iterator,
- size_t text_index);
+ RangeF GetGraphemeBounds(RenderTextHarfBuzz* render_text, size_t text_index);
// Returns whether the given shaped run contains any missing glyphs.
bool HasMissingGlyphs() const;
@@ -157,6 +157,9 @@ class GFX_EXPORT RenderTextHarfBuzz : public RenderText {
std::vector<FontSpan> GetFontSpansForTesting() override;
Range GetGlyphBounds(size_t index) override;
+ // ICU grapheme iterator for the layout text. Can be null in case of an error.
+ base::i18n::BreakIterator* GetGraphemeIterator();
+
protected:
// RenderText:
int GetDisplayTextBaseline() override;
@@ -232,9 +235,6 @@ class GFX_EXPORT RenderTextHarfBuzz : public RenderText {
// Makes sure that text runs for layout text are shaped.
void EnsureLayoutRunList();
- // ICU grapheme iterator for the layout text. Can be NULL in case of an error.
- base::i18n::BreakIterator* GetGraphemeIterator();
-
// Returns the current run list, |display_run_list_| if the text is
// elided, or |layout_run_list_| otherwise.
internal::TextRunList* GetRunList();
« no previous file with comments | « no previous file | ui/gfx/render_text_harfbuzz.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698