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

Unified Diff: third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. 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/graphics/gpu/WebGLImageConversion.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp b/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp
index 5e264f9ff68d4d84e888fb56406c9750f9cd8b14..ea70f0756e90a2abe9ef5f1c68ec0d5def123bb3 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp
@@ -11,8 +11,8 @@
#include "platform/graphics/skia/SkiaUtils.h"
#include "platform/image-decoders/ImageDecoder.h"
#include "third_party/skia/include/core/SkImage.h"
-#include "wtf/OwnPtr.h"
-#include "wtf/PassOwnPtr.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
namespace blink {
@@ -1715,7 +1715,7 @@ public:
{
const unsigned MaxNumberOfComponents = 4;
const unsigned MaxBytesPerComponent = 4;
- m_unpackedIntermediateSrcData = adoptArrayPtr(new uint8_t[m_width * MaxNumberOfComponents *MaxBytesPerComponent]);
+ m_unpackedIntermediateSrcData = wrapArrayUnique(new uint8_t[m_width * MaxNumberOfComponents *MaxBytesPerComponent]);
ASSERT(m_unpackedIntermediateSrcData.get());
}
@@ -1737,7 +1737,7 @@ private:
void* const m_dstStart;
const int m_srcStride, m_dstStride;
bool m_success;
- OwnPtr<uint8_t[]> m_unpackedIntermediateSrcData;
+ std::unique_ptr<uint8_t[]> m_unpackedIntermediateSrcData;
};
void FormatConverter::convert(WebGLImageConversion::DataFormat srcFormat, WebGLImageConversion::DataFormat dstFormat, WebGLImageConversion::AlphaOp alphaOp)
@@ -2141,7 +2141,7 @@ void WebGLImageConversion::ImageExtractor::extractImage(bool premultiplyAlpha, b
if ((!skiaImage || ignoreGammaAndColorProfile || (hasAlpha && !premultiplyAlpha)) && m_image->data()) {
// Attempt to get raw unpremultiplied image data.
- OwnPtr<ImageDecoder> decoder(ImageDecoder::create(
+ std::unique_ptr<ImageDecoder> decoder(ImageDecoder::create(
*(m_image->data()), ImageDecoder::AlphaNotPremultiplied,
ignoreGammaAndColorProfile ? ImageDecoder::GammaAndColorProfileIgnored : ImageDecoder::GammaAndColorProfileApplied));
if (!decoder)

Powered by Google App Engine
This is Rietveld 408576698