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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h

Issue 2037373002: Remove the use of OwnedPtrDeleter in ImageDecoder. (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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
index 7da3b9beaf524831f080a8816321202214490092..a2b4d6692a9bbcfb37f7472273745009b90ca669 100644
--- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
+++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
@@ -41,40 +41,38 @@
#include "wtf/Threading.h"
#include "wtf/Vector.h"
#include "wtf/text/WTFString.h"
+#include <memory>
#if USE(QCMSLIB)
#include "qcms.h"
+#endif
+
+namespace blink {
-namespace WTF {
+#if USE(QCMSLIB)
-template <typename T>
-struct OwnedPtrDeleter;
-template <>
-struct OwnedPtrDeleter<qcms_transform> {
- static void deletePtr(qcms_transform* transform)
+struct QCMSTransformDeleter {
+ void operator()(qcms_transform* transform)
{
if (transform)
qcms_transform_release(transform);
}
};
-template <typename T>
-struct OwnedPtrDeleter;
-template <>
-struct OwnedPtrDeleter<qcms_profile> {
- static void deletePtr(qcms_profile* profile)
+using QCMSTransformUniquePtr = std::unique_ptr<qcms_transform, QCMSTransformDeleter>;
+
+struct QCMSProfileDeleter {
urvang 2016/06/06 15:56:03 64 to 72 can technically be moved to the cpp file,
Yuta Kitamura 2016/06/07 05:25:40 Yeah, fixed in PS2.
+ void operator()(qcms_profile* profile)
{
if (profile)
qcms_profile_release(profile);
}
};
-} // namespace WTF
+using QCMSProfileUniquePtr = std::unique_ptr<qcms_profile, QCMSProfileDeleter>;
#endif // USE(QCMSLIB)
-namespace blink {
-
// ImagePlanes can be used to decode color components into provided buffers instead of using an ImageFrame.
class PLATFORM_EXPORT ImagePlanes final {
USING_FAST_MALLOC(ImagePlanes);
@@ -347,7 +345,7 @@ private:
bool m_failed;
#if USE(QCMSLIB)
- OwnPtr<qcms_transform> m_sourceToOutputDeviceColorTransform;
+ QCMSTransformUniquePtr m_sourceToOutputDeviceColorTransform;
#endif
};
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698