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

Unified Diff: ui/gfx/harfbuzz_font_skia.cc

Issue 2066323002: Remove SK_SUPPORT_LEGACY_TYPEFACE_PTR (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moar Mac fixes Created 4 years, 6 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 | « ui/gfx/harfbuzz_font_skia.h ('k') | ui/gfx/platform_font_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/harfbuzz_font_skia.cc
diff --git a/ui/gfx/harfbuzz_font_skia.cc b/ui/gfx/harfbuzz_font_skia.cc
index 719d4fe36b03fdbd8353417628f9d2f3315b0f95..889fa2d22954f8e33f87a53f98cdb4d942536bab 100644
--- a/ui/gfx/harfbuzz_font_skia.cc
+++ b/ui/gfx/harfbuzz_font_skia.cc
@@ -260,7 +260,7 @@ class HarfBuzzFace {
} // namespace
// Creates a HarfBuzz font from the given Skia face and text size.
-hb_font_t* CreateHarfBuzzFont(SkTypeface* skia_face,
+hb_font_t* CreateHarfBuzzFont(sk_sp<SkTypeface> skia_face,
SkScalar text_size,
const FontRenderParams& params,
bool subpixel_rendering_suppressed) {
@@ -269,13 +269,13 @@ hb_font_t* CreateHarfBuzzFont(SkTypeface* skia_face,
FaceCache* face_cache = &face_caches[skia_face->uniqueID()];
if (face_cache->first.get() == NULL)
- face_cache->first.Init(skia_face);
+ face_cache->first.Init(skia_face.get());
hb_font_t* harfbuzz_font = hb_font_create(face_cache->first.get());
const int scale = SkiaScalarToHarfBuzzUnits(text_size);
hb_font_set_scale(harfbuzz_font, scale, scale);
FontData* hb_font_data = new FontData(&face_cache->second);
- hb_font_data->paint_.setTypeface(skia_face);
+ hb_font_data->paint_.setTypeface(std::move(skia_face));
hb_font_data->paint_.setTextSize(text_size);
// TODO(ckocagil): Do we need to update these params later?
internal::ApplyRenderParams(params, subpixel_rendering_suppressed,
« no previous file with comments | « ui/gfx/harfbuzz_font_skia.h ('k') | ui/gfx/platform_font_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698