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

Unified Diff: cc/tiles/software_image_decode_controller.h

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: cc/tiles/software_image_decode_controller.h
diff --git a/cc/tiles/software_image_decode_controller.h b/cc/tiles/software_image_decode_controller.h
index 4e959c7f2f8deae238e8e1e1bd9b4435c12e29ff..701143700dd722866e53d48d8cb8173974ff58d9 100644
--- a/cc/tiles/software_image_decode_controller.h
+++ b/cc/tiles/software_image_decode_controller.h
@@ -124,7 +124,7 @@ class CC_EXPORT SoftwareImageDecodeController : public ImageDecodeController {
class DecodedImage {
public:
DecodedImage(const SkImageInfo& info,
- scoped_ptr<base::DiscardableMemory> memory,
+ std::unique_ptr<base::DiscardableMemory> memory,
const SkSize& src_rect_offset);
~DecodedImage();
@@ -142,7 +142,7 @@ class CC_EXPORT SoftwareImageDecodeController : public ImageDecodeController {
private:
bool locked_;
SkImageInfo image_info_;
- scoped_ptr<base::DiscardableMemory> memory_;
+ std::unique_ptr<base::DiscardableMemory> memory_;
skia::RefPtr<SkImage> image_;
SkSize src_rect_offset_;
};
@@ -174,8 +174,9 @@ class CC_EXPORT SoftwareImageDecodeController : public ImageDecodeController {
// Actually decode the image. Note that this function can (and should) be
// called with no lock acquired, since it can do a lot of work. Note that it
// can also return nullptr to indicate the decode failed.
- scoped_ptr<DecodedImage> DecodeImageInternal(const ImageKey& key,
- const DrawImage& draw_image);
+ std::unique_ptr<DecodedImage> DecodeImageInternal(
+ const ImageKey& key,
+ const DrawImage& draw_image);
// Get the decoded draw image for the given key and draw_image. Note that this
// function has to be called with no lock acquired, since it will acquire its
@@ -206,8 +207,9 @@ class CC_EXPORT SoftwareImageDecodeController : public ImageDecodeController {
// ensure that they are safe to access on multiple threads.
base::Lock lock_;
- using ImageMRUCache =
- base::HashingMRUCache<ImageKey, scoped_ptr<DecodedImage>, ImageKeyHash>;
+ using ImageMRUCache = base::HashingMRUCache<ImageKey,
+ std::unique_ptr<DecodedImage>,
+ ImageKeyHash>;
// Decoded images and ref counts (predecode path).
ImageMRUCache decoded_images_;

Powered by Google App Engine
This is Rietveld 408576698