OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2016 Google Inc. | 3 * Copyright 2016 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "SkAutoPixmapStorage.h" | 9 #include "SkAutoPixmapStorage.h" |
10 #include "SkData.h" | 10 #include "SkData.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 return nullptr; | 51 return nullptr; |
52 } | 52 } |
53 | 53 |
54 auto data = SkData::MakeFromMalloc(fStorage, this->getSafeSize()); | 54 auto data = SkData::MakeFromMalloc(fStorage, this->getSafeSize()); |
55 fStorage = nullptr; | 55 fStorage = nullptr; |
56 this->INHERITED::reset(); | 56 this->INHERITED::reset(); |
57 | 57 |
58 return data.release(); | 58 return data.release(); |
59 } | 59 } |
60 | 60 |
61 void SkAutoPixmapStorage::release() { | |
62 fStorage = nullptr; | |
63 this->INHERITED::reset(); | |
64 } | |
OLD | NEW |