Index: third_party/WebKit/Source/platform/graphics/PictureSnapshot.cpp |
diff --git a/third_party/WebKit/Source/platform/graphics/PictureSnapshot.cpp b/third_party/WebKit/Source/platform/graphics/PictureSnapshot.cpp |
index 8cc9f53a6929b0de30319d55d54a03e4150d3c39..5bc8eb1c111c1fab0bf9fd899111083c5cfe1fa4 100644 |
--- a/third_party/WebKit/Source/platform/graphics/PictureSnapshot.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/PictureSnapshot.cpp |
@@ -46,10 +46,8 @@ |
#include "third_party/skia/include/core/SkStream.h" |
#include "wtf/CurrentTime.h" |
#include "wtf/HexNumber.h" |
-#include "wtf/PtrUtil.h" |
#include "wtf/text/Base64.h" |
#include "wtf/text/TextEncoding.h" |
-#include <memory> |
namespace blink { |
@@ -60,7 +58,7 @@ PictureSnapshot::PictureSnapshot(PassRefPtr<const SkPicture> picture) |
static bool decodeBitmap(const void* data, size_t length, SkBitmap* result) |
{ |
- std::unique_ptr<ImageDecoder> imageDecoder = ImageDecoder::create(static_cast<const char*>(data), length, |
+ OwnPtr<ImageDecoder> imageDecoder = ImageDecoder::create(static_cast<const char*>(data), length, |
ImageDecoder::AlphaPremultiplied, ImageDecoder::GammaAndColorProfileIgnored); |
if (!imageDecoder) |
return false; |
@@ -109,7 +107,7 @@ bool PictureSnapshot::isEmpty() const |
return m_picture->cullRect().isEmpty(); |
} |
-std::unique_ptr<Vector<char>> PictureSnapshot::replay(unsigned fromStep, unsigned toStep, double scale) const |
+PassOwnPtr<Vector<char>> PictureSnapshot::replay(unsigned fromStep, unsigned toStep, double scale) const |
{ |
const SkIRect bounds = m_picture->cullRect().roundOut(); |
@@ -129,7 +127,7 @@ std::unique_ptr<Vector<char>> PictureSnapshot::replay(unsigned fromStep, unsigne |
canvas.resetStepCount(); |
m_picture->playback(&canvas, &canvas); |
} |
- std::unique_ptr<Vector<char>> base64Data = wrapUnique(new Vector<char>()); |
+ OwnPtr<Vector<char>> base64Data = adoptPtr(new Vector<char>()); |
Vector<char> encodedImage; |
RefPtr<SkImage> image = fromSkSp(SkImage::MakeFromBitmap(bitmap)); |
@@ -146,9 +144,9 @@ std::unique_ptr<Vector<char>> PictureSnapshot::replay(unsigned fromStep, unsigne |
return base64Data; |
} |
-std::unique_ptr<PictureSnapshot::Timings> PictureSnapshot::profile(unsigned minRepeatCount, double minDuration, const FloatRect* clipRect) const |
+PassOwnPtr<PictureSnapshot::Timings> PictureSnapshot::profile(unsigned minRepeatCount, double minDuration, const FloatRect* clipRect) const |
{ |
- std::unique_ptr<PictureSnapshot::Timings> timings = wrapUnique(new PictureSnapshot::Timings()); |
+ OwnPtr<PictureSnapshot::Timings> timings = adoptPtr(new PictureSnapshot::Timings()); |
timings->reserveCapacity(minRepeatCount); |
const SkIRect bounds = m_picture->cullRect().roundOut(); |
SkBitmap bitmap; |