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

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: scopedptrcc: rebase 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
« no previous file with comments | « cc/tiles/raster_tile_priority_queue_required.cc ('k') | cc/tiles/software_image_decode_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 baf99f0a6d085a08bcce0c5514147e2aeb3f414d..a6262e9d78e88e0509d5cdbd7c047632985d2210 100644
--- a/cc/tiles/software_image_decode_controller.h
+++ b/cc/tiles/software_image_decode_controller.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <memory>
#include <unordered_map>
#include <unordered_set>
@@ -132,7 +133,7 @@ class CC_EXPORT SoftwareImageDecodeController
class DecodedImage {
public:
DecodedImage(const SkImageInfo& info,
- scoped_ptr<base::DiscardableMemory> memory,
+ std::unique_ptr<base::DiscardableMemory> memory,
const SkSize& src_rect_offset,
uint64_t tracing_id);
~DecodedImage();
@@ -157,7 +158,7 @@ class CC_EXPORT SoftwareImageDecodeController
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_;
uint64_t tracing_id_;
@@ -181,8 +182,9 @@ class CC_EXPORT SoftwareImageDecodeController
base::CheckedNumeric<size_t> current_usage_bytes_;
};
- using ImageMRUCache =
- base::HashingMRUCache<ImageKey, scoped_ptr<DecodedImage>, ImageKeyHash>;
+ using ImageMRUCache = base::HashingMRUCache<ImageKey,
+ std::unique_ptr<DecodedImage>,
+ ImageKeyHash>;
// Looks for the key in the cache and returns true if it was found and was
// successfully locked (or if it was already locked). Note that if this
@@ -192,8 +194,9 @@ class CC_EXPORT SoftwareImageDecodeController
// 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
« no previous file with comments | « cc/tiles/raster_tile_priority_queue_required.cc ('k') | cc/tiles/software_image_decode_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698