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

Unified Diff: media/webm/chromeos/webm_encoder.cc

Issue 15659006: Cleanup: Remove ScopedGenericObj usage in media/. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/webm/chromeos/webm_encoder.cc
===================================================================
--- media/webm/chromeos/webm_encoder.cc (revision 202209)
+++ media/webm/chromeos/webm_encoder.cc (working copy)
@@ -7,7 +7,7 @@
#include "base/bind.h"
#include "base/file_util.h"
#include "base/logging.h"
-#include "base/memory/scoped_generic_obj.h"
+#include "base/memory/scoped_ptr.h"
#include "libyuv/convert.h"
#include "libyuv/video_common.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -36,16 +36,14 @@
}
// Wrapper functor for vpx_codec_destroy().
-class VpxCodecDestroyHelper {
- public:
+struct VpxCodecDeleter {
void operator()(vpx_codec_ctx_t* codec) {
vpx_codec_destroy(codec);
}
};
// Wrapper functor for vpx_img_free().
-class VpxImgFreeHelper {
- public:
+struct VpxImgDeleter {
void operator()(vpx_image_t* image) {
vpx_img_free(image);
}
@@ -89,7 +87,7 @@
vpx_image_t image;
vpx_img_alloc(&image, VPX_IMG_FMT_I420, width_, height_, 16);
// Ensure that image is freed after return.
- ScopedGenericObj<vpx_image_t*, VpxImgFreeHelper> image_ptr(&image);
+ scoped_ptr<vpx_image_t, VpxImgDeleter> image_ptr(&image);
const vpx_codec_iface_t* codec_iface = vpx_codec_vp8_cx();
DCHECK(codec_iface);
@@ -113,7 +111,7 @@
if (ret != VPX_CODEC_OK)
return false;
// Ensure that codec context is freed after return.
- ScopedGenericObj<vpx_codec_ctx_t*, VpxCodecDestroyHelper> codec_ptr(&codec);
+ scoped_ptr<vpx_codec_ctx_t, VpxCodecDeleter> codec_ptr(&codec);
SkAutoLockPixels lock_sprite(sprite);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698