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

Unified Diff: ui/gfx/render_text_harfbuzz.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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/render_text_harfbuzz.h ('k') | ui/gfx/render_text_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text_harfbuzz.cc
diff --git a/ui/gfx/render_text_harfbuzz.cc b/ui/gfx/render_text_harfbuzz.cc
index 590537ebe63c281f96724e670dc537190cdada03..731cc6f24051c2a15b6b6cc31888a03fe38387fa 100644
--- a/ui/gfx/render_text_harfbuzz.cc
+++ b/ui/gfx/render_text_harfbuzz.cc
@@ -11,6 +11,7 @@
#include "base/i18n/break_iterator.h"
#include "base/i18n/char_iterator.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/profiler/scoped_tracker.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -760,8 +761,9 @@ RenderTextHarfBuzz::RenderTextHarfBuzz()
RenderTextHarfBuzz::~RenderTextHarfBuzz() {}
-scoped_ptr<RenderText> RenderTextHarfBuzz::CreateInstanceOfSameType() const {
- return make_scoped_ptr(new RenderTextHarfBuzz);
+std::unique_ptr<RenderText> RenderTextHarfBuzz::CreateInstanceOfSameType()
+ const {
+ return base::WrapUnique(new RenderTextHarfBuzz);
}
bool RenderTextHarfBuzz::MultilineSupported() const {
@@ -1089,7 +1091,7 @@ void RenderTextHarfBuzz::EnsureLayout() {
if (lines().empty()) {
// TODO(ckocagil): Remove ScopedTracker below once crbug.com/441028 is
// fixed.
- scoped_ptr<tracked_objects::ScopedTracker> tracking_profile(
+ std::unique_ptr<tracked_objects::ScopedTracker> tracking_profile(
new tracked_objects::ScopedTracker(
FROM_HERE_WITH_EXPLICIT_FUNCTION("441028 HarfBuzzLineBreaker")));
@@ -1135,7 +1137,7 @@ void RenderTextHarfBuzz::DrawVisualText(internal::SkiaTextRenderer* renderer) {
renderer->SetFontRenderParams(run.render_params,
subpixel_rendering_suppressed());
Range glyphs_range = run.CharRangeToGlyphRange(segment.char_range);
- scoped_ptr<SkPoint[]> positions(new SkPoint[glyphs_range.length()]);
+ std::unique_ptr<SkPoint[]> positions(new SkPoint[glyphs_range.length()]);
SkScalar offset_x = preceding_segment_widths -
((glyphs_range.GetMin() != 0)
? run.positions[glyphs_range.GetMin()].x()
« no previous file with comments | « ui/gfx/render_text_harfbuzz.h ('k') | ui/gfx/render_text_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698