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

Unified Diff: src/core/SkDescriptor.h

Issue 1238473004: Cleanup of GrFontDescKey (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | src/gpu/GrFontScaler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(); }
« no previous file with comments | « no previous file | src/gpu/GrFontScaler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698