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

Unified Diff: third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.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/graphics/filters/FEConvolveMatrix.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.cpp b/third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.cpp
index ece3a8df1e077e65d2f04e5087fa1f14d868710d..0101f44b8bb1a7f72e5cafd57a6a4595d33285ef 100644
--- a/third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.cpp
+++ b/third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.cpp
@@ -28,8 +28,7 @@
#include "platform/graphics/filters/SkiaImageFilterBuilder.h"
#include "platform/text/TextStream.h"
#include "wtf/CheckedNumeric.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
+#include "wtf/OwnPtr.h"
namespace blink {
@@ -151,7 +150,7 @@ sk_sp<SkImageFilter> FEConvolveMatrix::createImageFilter()
SkIPoint target = SkIPoint::Make(m_targetOffset.x(), m_targetOffset.y());
SkMatrixConvolutionImageFilter::TileMode tileMode = toSkiaTileMode(m_edgeMode);
bool convolveAlpha = !m_preserveAlpha;
- std::unique_ptr<SkScalar[]> kernel = wrapArrayUnique(new SkScalar[numElements]);
+ OwnPtr<SkScalar[]> kernel = adoptArrayPtr(new SkScalar[numElements]);
for (int i = 0; i < numElements; ++i)
kernel[i] = SkFloatToScalar(m_kernelMatrix[numElements - 1 - i]);
SkImageFilter::CropRect cropRect = getCropRect();

Powered by Google App Engine
This is Rietveld 408576698