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

Unified Diff: cc/output/copy_output_result.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/output/copy_output_request.cc ('k') | cc/output/copy_output_result.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/copy_output_result.h
diff --git a/cc/output/copy_output_result.h b/cc/output/copy_output_result.h
index 57f0cca66effcfa36a01467306569648937fdddf..a64fc5108ef4cc46ce8cead0e9dfac49ea83bc84 100644
--- a/cc/output/copy_output_result.h
+++ b/cc/output/copy_output_result.h
@@ -5,7 +5,9 @@
#ifndef CC_OUTPUT_COPY_OUTPUT_RESULT_H_
#define CC_OUTPUT_COPY_OUTPUT_RESULT_H_
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
+#include "base/memory/ptr_util.h"
#include "cc/base/cc_export.h"
#include "cc/resources/single_release_callback.h"
#include "cc/resources/texture_mailbox.h"
@@ -18,19 +20,19 @@ class TextureMailbox;
class CC_EXPORT CopyOutputResult {
public:
- static scoped_ptr<CopyOutputResult> CreateEmptyResult() {
- return make_scoped_ptr(new CopyOutputResult);
+ static std::unique_ptr<CopyOutputResult> CreateEmptyResult() {
+ return base::WrapUnique(new CopyOutputResult);
}
- static scoped_ptr<CopyOutputResult> CreateBitmapResult(
- scoped_ptr<SkBitmap> bitmap) {
- return make_scoped_ptr(new CopyOutputResult(std::move(bitmap)));
+ static std::unique_ptr<CopyOutputResult> CreateBitmapResult(
+ std::unique_ptr<SkBitmap> bitmap) {
+ return base::WrapUnique(new CopyOutputResult(std::move(bitmap)));
}
- static scoped_ptr<CopyOutputResult> CreateTextureResult(
+ static std::unique_ptr<CopyOutputResult> CreateTextureResult(
const gfx::Size& size,
const TextureMailbox& texture_mailbox,
- scoped_ptr<SingleReleaseCallback> release_callback) {
- return make_scoped_ptr(new CopyOutputResult(size, texture_mailbox,
- std::move(release_callback)));
+ std::unique_ptr<SingleReleaseCallback> release_callback) {
+ return base::WrapUnique(new CopyOutputResult(size, texture_mailbox,
+ std::move(release_callback)));
}
~CopyOutputResult();
@@ -40,21 +42,22 @@ class CC_EXPORT CopyOutputResult {
bool HasTexture() const { return texture_mailbox_.IsValid(); }
gfx::Size size() const { return size_; }
- scoped_ptr<SkBitmap> TakeBitmap();
+ std::unique_ptr<SkBitmap> TakeBitmap();
void TakeTexture(TextureMailbox* texture_mailbox,
- scoped_ptr<SingleReleaseCallback>* release_callback);
+ std::unique_ptr<SingleReleaseCallback>* release_callback);
private:
CopyOutputResult();
- explicit CopyOutputResult(scoped_ptr<SkBitmap> bitmap);
- explicit CopyOutputResult(const gfx::Size& size,
- const TextureMailbox& texture_mailbox,
- scoped_ptr<SingleReleaseCallback> release_callback);
+ explicit CopyOutputResult(std::unique_ptr<SkBitmap> bitmap);
+ explicit CopyOutputResult(
+ const gfx::Size& size,
+ const TextureMailbox& texture_mailbox,
+ std::unique_ptr<SingleReleaseCallback> release_callback);
gfx::Size size_;
- scoped_ptr<SkBitmap> bitmap_;
+ std::unique_ptr<SkBitmap> bitmap_;
TextureMailbox texture_mailbox_;
- scoped_ptr<SingleReleaseCallback> release_callback_;
+ std::unique_ptr<SingleReleaseCallback> release_callback_;
};
} // namespace cc
« no previous file with comments | « cc/output/copy_output_request.cc ('k') | cc/output/copy_output_result.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698