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

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: Address comments from Kent; merge. 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 a12ac2445e45a64296c6706fd4001087968f5185..919de4dd5b6139da8e2a664ac05cb52336f21c11 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp
@@ -10,8 +10,8 @@
#include "platform/graphics/cpu/x86/WebGLImageConversionSSE.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 {
@@ -1714,7 +1714,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());
}
@@ -1736,7 +1736,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)
@@ -2140,7 +2140,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