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

Unified Diff: ui/gfx/harfbuzz_font_skia.cc

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 side-by-side diff with in-line comments
Download patch
Index: ui/gfx/harfbuzz_font_skia.cc
diff --git a/ui/gfx/harfbuzz_font_skia.cc b/ui/gfx/harfbuzz_font_skia.cc
index 2eaa0b0f0aeaca287cd45a2014eb1f792177f735..4c15a91d2efe118c3a56e7eed6a8ca9cd766bf01 100644
--- a/ui/gfx/harfbuzz_font_skia.cc
+++ b/ui/gfx/harfbuzz_font_skia.cc
@@ -258,7 +258,7 @@ class HarfBuzzFace {
hb_font_t* CreateHarfBuzzFont(SkTypeface* skia_face,
SkScalar text_size,
const FontRenderParams& params,
- bool background_is_transparent) {
+ bool subpixel_rendering_enabled) {
// TODO(ckocagil): This shouldn't grow indefinitely. Maybe use base::MRUCache?
static std::map<SkFontID, FaceCache> face_caches;
@@ -273,7 +273,7 @@ hb_font_t* CreateHarfBuzzFont(SkTypeface* skia_face,
hb_font_data->paint_.setTypeface(skia_face);
hb_font_data->paint_.setTextSize(text_size);
// TODO(ckocagil): Do we need to update these params later?
- internal::ApplyRenderParams(params, background_is_transparent,
+ internal::ApplyRenderParams(params, subpixel_rendering_enabled,
&hb_font_data->paint_);
hb_font_set_funcs(harfbuzz_font, g_font_funcs.Get().get(), hb_font_data,
DeleteByType<FontData>);
« no previous file with comments | « ui/gfx/harfbuzz_font_skia.h ('k') | ui/gfx/render_text.h » ('j') | ui/gfx/render_text.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698