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

Unified Diff: include/core/SkBitmap.h

Issue 1514503004: SkBitmap move (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-12-14 (Monday) 12:58:31 EST Created 5 years 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 | src/core/SkBitmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkBitmap.h
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index cf1c4c77f208f718a54dbe1a3c677810a3eb70e2..a81e03eefa68aaf995cac3d3e38a21058b1b5584 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -54,12 +54,24 @@ public:
*/
SkBitmap(const SkBitmap& src);
+ /**
+ * Copy the settings from the src into this bitmap. If the src has pixels
+ * allocated, ownership of the pixels will be taken.
+ */
+ SkBitmap(SkBitmap&& src);
+
~SkBitmap();
- /** Copies the src bitmap into this bitmap. Ownership of the src bitmap's pixels remains
- with the src bitmap.
+ /** Copies the src bitmap into this bitmap. Ownership of the src
+ bitmap's pixels is shared with the src bitmap.
*/
SkBitmap& operator=(const SkBitmap& src);
+
+ /** Copies the src bitmap into this bitmap. Takes ownership of the src
+ bitmap's pixels.
+ */
+ SkBitmap& operator=(SkBitmap&& src);
+
/** Swap the fields of the two bitmaps. This routine is guaranteed to never fail or throw.
*/
// This method is not exported to java.
« no previous file with comments | « no previous file | src/core/SkBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698