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

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, 9 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
« no previous file with comments | « ui/gfx/render_text.cc ('k') | ui/gfx/render_text_harfbuzz.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
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 bool MultilineSupported() const override;
138 const base::string16& GetDisplayText() override; 139 const base::string16& GetDisplayText() 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;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 260
260 // Fixed width of glyphs. This should only be set in test environments. 261 // Fixed width of glyphs. This should only be set in test environments.
261 float glyph_width_for_test_; 262 float glyph_width_for_test_;
262 263
263 DISALLOW_COPY_AND_ASSIGN(RenderTextHarfBuzz); 264 DISALLOW_COPY_AND_ASSIGN(RenderTextHarfBuzz);
264 }; 265 };
265 266
266 } // namespace gfx 267 } // namespace gfx
267 268
268 #endif // UI_GFX_RENDER_TEXT_HARFBUZZ_H_ 269 #endif // UI_GFX_RENDER_TEXT_HARFBUZZ_H_
OLDNEW
« no previous file with comments | « ui/gfx/render_text.cc ('k') | ui/gfx/render_text_harfbuzz.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698