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

Unified Diff: third_party/WebKit/Source/platform/image-encoders/JPEGImageEncoder.h

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/image-encoders/JPEGImageEncoder.h
diff --git a/third_party/WebKit/Source/platform/image-encoders/JPEGImageEncoder.h b/third_party/WebKit/Source/platform/image-encoders/JPEGImageEncoder.h
index afc0c9f128654435537e3f3f3d0032742a9d3906..7ed6d30dff123fb151b36fbe3bdcdf2da3c8bd0d 100644
--- a/third_party/WebKit/Source/platform/image-encoders/JPEGImageEncoder.h
+++ b/third_party/WebKit/Source/platform/image-encoders/JPEGImageEncoder.h
@@ -33,8 +33,8 @@
#include "platform/geometry/IntSize.h"
#include "wtf/Allocator.h"
+#include "wtf/PassOwnPtr.h"
#include "wtf/Vector.h"
-#include <memory>
namespace blink {
@@ -44,7 +44,7 @@ class PLATFORM_EXPORT JPEGImageEncoderState {
USING_FAST_MALLOC(JPEGImageEncoderState);
WTF_MAKE_NONCOPYABLE(JPEGImageEncoderState);
public:
- static std::unique_ptr<JPEGImageEncoderState> create(const IntSize& imageSize, const double& quality, Vector<unsigned char>* output);
+ static PassOwnPtr<JPEGImageEncoderState> create(const IntSize& imageSize, const double& quality, Vector<unsigned char>* output);
JPEGImageEncoderState() {}
virtual ~JPEGImageEncoderState() {}
};
@@ -63,7 +63,7 @@ public:
// be safer.
static bool encode(const ImageDataBuffer&, const double& quality, Vector<unsigned char>*);
- static bool encodeWithPreInitializedState(std::unique_ptr<JPEGImageEncoderState>, const unsigned char*, int numRowsCompleted = 0);
+ static bool encodeWithPreInitializedState(PassOwnPtr<JPEGImageEncoderState>, const unsigned char*, int numRowsCompleted = 0);
static int progressiveEncodeRowsJpegHelper(JPEGImageEncoderState*, unsigned char*, int, const double, double);
static int computeCompressionQuality(const double& quality);

Powered by Google App Engine
This is Rietveld 408576698