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

Unified Diff: third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
index e05e7b13da28da65a3873b572c727bd5b5916c04..9367176addd14a411c74aebe215e2155d280a86b 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
+++ b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
@@ -34,9 +34,7 @@
#include "platform/fonts/Font.h"
#include "platform/fonts/shaping/ShapeResultInlineHeaders.h"
#include "platform/fonts/shaping/ShapeResultSpacing.h"
-#include "wtf/PtrUtil.h"
#include <hb.h>
-#include <memory>
namespace blink {
@@ -156,7 +154,7 @@ ShapeResult::ShapeResult(const ShapeResult& other)
{
m_runs.reserveCapacity(other.m_runs.size());
for (const auto& run : other.m_runs)
- m_runs.append(wrapUnique(new ShapeResult::RunInfo(*run)));
+ m_runs.append(adoptPtr(new ShapeResult::RunInfo(*run)));
}
ShapeResult::~ShapeResult()
@@ -280,11 +278,11 @@ static inline float harfBuzzPositionToFloat(hb_position_t value)
return static_cast<float>(value) / (1 << 16);
}
-void ShapeResult::insertRun(std::unique_ptr<ShapeResult::RunInfo> runToInsert,
+void ShapeResult::insertRun(PassOwnPtr<ShapeResult::RunInfo> runToInsert,
unsigned startGlyph, unsigned numGlyphs, hb_buffer_t* harfBuzzBuffer)
{
ASSERT(numGlyphs > 0);
- std::unique_ptr<ShapeResult::RunInfo> run(std::move(runToInsert));
+ OwnPtr<ShapeResult::RunInfo> run(std::move(runToInsert));
ASSERT(numGlyphs == run->m_glyphData.size());
const SimpleFontData* currentFontData = run->m_fontData.get();

Powered by Google App Engine
This is Rietveld 408576698