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

Side by Side Diff: ui/gfx/render_text_harfbuzz.h

Issue 867003002: Cache gfx::RenderText instances in views::Label. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_RENDER_TEXT_HARFBUZZ_H_ 5 #ifndef UI_GFX_RENDER_TEXT_HARFBUZZ_H_
6 #define UI_GFX_RENDER_TEXT_HARFBUZZ_H_ 6 #define UI_GFX_RENDER_TEXT_HARFBUZZ_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "third_party/harfbuzz-ng/src/hb.h" 10 #include "third_party/harfbuzz-ng/src/hb.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 } // namespace internal 129 } // namespace internal
130 130
131 class GFX_EXPORT RenderTextHarfBuzz : public RenderText { 131 class GFX_EXPORT RenderTextHarfBuzz : public RenderText {
132 public: 132 public:
133 RenderTextHarfBuzz(); 133 RenderTextHarfBuzz();
134 ~RenderTextHarfBuzz() override; 134 ~RenderTextHarfBuzz() override;
135 135
136 // RenderText: 136 // RenderText:
137 scoped_ptr<RenderText> CreateInstanceOfSameType() const override; 137 scoped_ptr<RenderText> CreateInstanceOfSameType() const override;
138 const base::string16& GetDisplayText() override; 138 const base::string16& GetDisplayText() override;
139 bool MultilineSupported() const override;
139 Size GetStringSize() override; 140 Size GetStringSize() override;
140 SizeF GetStringSizeF() override; 141 SizeF GetStringSizeF() override;
141 SelectionModel FindCursorPosition(const Point& point) override; 142 SelectionModel FindCursorPosition(const Point& point) override;
142 std::vector<FontSpan> GetFontSpansForTesting() override; 143 std::vector<FontSpan> GetFontSpansForTesting() override;
143 Range GetGlyphBounds(size_t index) override; 144 Range GetGlyphBounds(size_t index) override;
144 145
145 protected: 146 protected:
146 // RenderText: 147 // RenderText:
147 int GetDisplayTextBaseline() override; 148 int GetDisplayTextBaseline() override;
148 SelectionModel AdjacentCharSelectionModel( 149 SelectionModel AdjacentCharSelectionModel(
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 258
258 // Fixed width of glyphs. This should only be set in test environments. 259 // Fixed width of glyphs. This should only be set in test environments.
259 uint8 glyph_width_for_test_; 260 uint8 glyph_width_for_test_;
260 261
261 DISALLOW_COPY_AND_ASSIGN(RenderTextHarfBuzz); 262 DISALLOW_COPY_AND_ASSIGN(RenderTextHarfBuzz);
262 }; 263 };
263 264
264 } // namespace gfx 265 } // namespace gfx
265 266
266 #endif // UI_GFX_RENDER_TEXT_HARFBUZZ_H_ 267 #endif // UI_GFX_RENDER_TEXT_HARFBUZZ_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698