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

Unified Diff: ui/gfx/platform_font_win.cc

Issue 1939143002: Remove all uses of skia::RefPtr and stale includes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bad rebase Created 4 years, 7 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/platform_font_linux.cc ('k') | ui/gfx/render_text.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/platform_font_win.cc
diff --git a/ui/gfx/platform_font_win.cc b/ui/gfx/platform_font_win.cc
index 35e170c9979a171a1f0ce1e45ebfeeab6b2f9ed3..e039d08717bed85e5ed4483d8b4391161191745d 100644
--- a/ui/gfx/platform_font_win.cc
+++ b/ui/gfx/platform_font_win.cc
@@ -26,6 +26,7 @@
#include "base/win/scoped_select_object.h"
#include "base/win/win_util.h"
#include "third_party/skia/include/core/SkFontLCDConfig.h"
+#include "third_party/skia/include/core/SkRefCnt.h"
#include "third_party/skia/include/core/SkTypeface.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/font.h"
@@ -584,7 +585,7 @@ PlatformFontWin::HFontRef* PlatformFontWin::CreateHFontRefFromSkia(
DWRITE_FONT_METRICS dwrite_font_metrics = {0};
dwrite_font->GetMetrics(&dwrite_font_metrics);
- skia::RefPtr<SkTypeface> skia_face = skia::AdoptRef(
+ sk_sp<SkTypeface> skia_face(
SkTypeface::CreateFromName(
base::SysWideToUTF8(font_info.lfFaceName).c_str(),
static_cast<SkTypeface::Style>(skia_style)));
@@ -600,7 +601,7 @@ PlatformFontWin::HFontRef* PlatformFontWin::CreateHFontRefFromSkia(
SkPaint paint;
paint.setAntiAlias(font_params.antialiasing);
- paint.setTypeface(skia_face.get());
+ paint.setTypeface(std::move(skia_face));
paint.setTextSize(-font_info.lfHeight);
SkPaint::FontMetrics skia_metrics;
paint.getFontMetrics(&skia_metrics);
« no previous file with comments | « ui/gfx/platform_font_linux.cc ('k') | ui/gfx/render_text.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698