Index: src/core/SkDescriptor.h |
diff --git a/src/core/SkDescriptor.h b/src/core/SkDescriptor.h |
index 0693ccfe60d82226b95eb5f73e69fc16b46cd9de..e559215cb169dc0c502fe1358783a07d202dcac5 100644 |
--- a/src/core/SkDescriptor.h |
+++ b/src/core/SkDescriptor.h |
@@ -136,6 +136,11 @@ class SkAutoDescriptor : SkNoncopyable { |
public: |
SkAutoDescriptor() : fDesc(NULL) {} |
SkAutoDescriptor(size_t size) : fDesc(NULL) { this->reset(size); } |
+ SkAutoDescriptor(const SkDescriptor& desc) : fDesc(NULL) { |
+ size_t size = desc.getLength(); |
+ this->reset(size); |
+ memcpy(fDesc, &desc, size); |
+ } |
~SkAutoDescriptor() { this->free(); } |