| Index: src/core/SkBitmap.cpp
|
| diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
|
| index 8997f2b0140b41f62d1096e847f10b03a4cfaaa8..97802aefc0a4af4a5ebb6d10bbaded4de75356b1 100644
|
| --- a/src/core/SkBitmap.cpp
|
| +++ b/src/core/SkBitmap.cpp
|
| @@ -72,6 +72,16 @@ SkBitmap& SkBitmap::operator=(const SkBitmap& src) {
|
| return *this;
|
| }
|
|
|
| +SkBitmap& SkBitmap::operator=(SkBitmap&& other) {
|
| + if (this != &other) {
|
| + this->swap(other);
|
| + other.reset();
|
| + }
|
| + return *this;
|
| +}
|
| +
|
| +SkBitmap::SkBitmap(SkBitmap&& other) : SkBitmap() { this->swap(other); }
|
| +
|
| void SkBitmap::swap(SkBitmap& other) {
|
| SkTSwap(fColorTable, other.fColorTable);
|
| SkTSwap(fPixelRef, other.fPixelRef);
|
|
|