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

Unified Diff: cc/output/copy_output_result.h

Issue 2670213006: Mojom structs for copy requests / results should map to unique_ptr (Closed)
Patch Set: c Created 3 years, 10 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.h ('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 cca1270b09bf112eaeb56a01ffe110ff846f734e..23334645edcd140eb088e216fa9c8f58e56d0b91 100644
--- a/cc/output/copy_output_result.h
+++ b/cc/output/copy_output_result.h
@@ -42,14 +42,8 @@ class CC_EXPORT CopyOutputResult {
std::move(release_callback)));
}
- CopyOutputResult();
-
- CopyOutputResult(CopyOutputResult&& other);
-
~CopyOutputResult();
- CopyOutputResult& operator=(CopyOutputResult&& other);
-
bool IsEmpty() const { return !HasBitmap() && !HasTexture(); }
bool HasBitmap() const { return !!bitmap_ && !bitmap_->isNull(); }
bool HasTexture() const { return texture_mailbox_.IsValid(); }
@@ -61,8 +55,9 @@ class CC_EXPORT CopyOutputResult {
private:
friend struct mojo::StructTraits<mojom::CopyOutputResultDataView,
- CopyOutputResult>;
+ std::unique_ptr<CopyOutputResult>>;
+ CopyOutputResult();
explicit CopyOutputResult(std::unique_ptr<SkBitmap> bitmap);
explicit CopyOutputResult(
const gfx::Size& size,
@@ -73,6 +68,8 @@ class CC_EXPORT CopyOutputResult {
std::unique_ptr<SkBitmap> bitmap_;
TextureMailbox texture_mailbox_;
std::unique_ptr<SingleReleaseCallback> release_callback_;
+
+ DISALLOW_COPY_AND_ASSIGN(CopyOutputResult);
};
} // namespace cc
« no previous file with comments | « cc/output/copy_output_request.h ('k') | cc/output/copy_output_result.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698