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

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

Issue 484883003: Re-land: RenderTextHarfBuzz: Set font render parameters in font data functions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment fixed Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/gfx.gyp ('k') | ui/gfx/render_text.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_H_ 5 #ifndef UI_GFX_RENDER_TEXT_H_
6 #define UI_GFX_RENDER_TEXT_H_ 6 #define UI_GFX_RENDER_TEXT_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <cstring> 9 #include <cstring>
10 #include <string> 10 #include <string>
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 // Maximum baseline of all segments on this line. 172 // Maximum baseline of all segments on this line.
173 int baseline; 173 int baseline;
174 }; 174 };
175 175
176 // Creates an SkTypeface from a font |family| name and a |gfx::Font::FontStyle|. 176 // Creates an SkTypeface from a font |family| name and a |gfx::Font::FontStyle|.
177 // May return NULL. 177 // May return NULL.
178 skia::RefPtr<SkTypeface> CreateSkiaTypeface(const std::string& family, 178 skia::RefPtr<SkTypeface> CreateSkiaTypeface(const std::string& family,
179 int style); 179 int style);
180 180
181 // Applies the given FontRenderParams to a Skia |paint|.
182 void ApplyRenderParams(const FontRenderParams& params,
183 bool background_is_transparent,
184 SkPaint* paint);
185
181 } // namespace internal 186 } // namespace internal
182 187
183 // RenderText represents an abstract model of styled text and its corresponding 188 // RenderText represents an abstract model of styled text and its corresponding
184 // visual layout. Support is built in for a cursor, a selection, simple styling, 189 // visual layout. Support is built in for a cursor, a selection, simple styling,
185 // complex scripts, and bi-directional text. Implementations provide mechanisms 190 // complex scripts, and bi-directional text. Implementations provide mechanisms
186 // for rendering and translation between logical and visual data. 191 // for rendering and translation between logical and visual data.
187 class GFX_EXPORT RenderText { 192 class GFX_EXPORT RenderText {
188 public: 193 public:
189 virtual ~RenderText(); 194 virtual ~RenderText();
190 195
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 // Lines computed by EnsureLayout. These should be invalidated with 726 // Lines computed by EnsureLayout. These should be invalidated with
722 // ResetLayout and on |display_rect_| changes. 727 // ResetLayout and on |display_rect_| changes.
723 std::vector<internal::Line> lines_; 728 std::vector<internal::Line> lines_;
724 729
725 DISALLOW_COPY_AND_ASSIGN(RenderText); 730 DISALLOW_COPY_AND_ASSIGN(RenderText);
726 }; 731 };
727 732
728 } // namespace gfx 733 } // namespace gfx
729 734
730 #endif // UI_GFX_RENDER_TEXT_H_ 735 #endif // UI_GFX_RENDER_TEXT_H_
OLDNEW
« no previous file with comments | « ui/gfx/gfx.gyp ('k') | ui/gfx/render_text.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698