Chromium Code Reviews| Index: src/pdf/SkPDFDevice.cpp |
| diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp |
| index b2082019a49af74bbd986754d290ab3af4242348..44283ba02b666bf3bb686bb8b137c8691c844abc 100644 |
| --- a/src/pdf/SkPDFDevice.cpp |
| +++ b/src/pdf/SkPDFDevice.cpp |
| @@ -592,7 +592,7 @@ SkPDFCanon* SkPDFDevice::getCanon() const { return fDocument->canon(); } |
| struct ContentEntry { |
| GraphicStateEntry fState; |
| SkDynamicMemoryWStream fContent; |
| - SkAutoTDelete<ContentEntry> fNext; |
| + std::unique_ptr<ContentEntry> fNext; |
|
bungeman-skia
2016/03/25 19:54:22
Hopefully this doesn't break the Android NDK build
hal.canary
2016/03/28 14:23:32
I'll hold off on these. This should be a linked l
|
| // If the stack is too deep we could get Stack Overflow. |
| // So we manually destruct the object. |
| @@ -1417,7 +1417,7 @@ ContentEntry* SkPDFDevice::getLastContentEntry() { |
| } |
| } |
| -SkAutoTDelete<ContentEntry>* SkPDFDevice::getContentEntries() { |
| +std::unique_ptr<ContentEntry>* SkPDFDevice::getContentEntries() { |
| if (fDrawingArea == kContent_DrawingArea) { |
| return &fContentEntries; |
| } else { |
| @@ -1762,7 +1762,7 @@ ContentEntry* SkPDFDevice::setUpContentEntry(const SkClipStack* clipStack, |
| } |
| ContentEntry* entry; |
| - SkAutoTDelete<ContentEntry> newEntry; |
| + std::unique_ptr<ContentEntry> newEntry; |
| ContentEntry* lastContentEntry = getLastContentEntry(); |
| if (lastContentEntry && lastContentEntry->fContent.getOffset() == 0) { |
| @@ -1779,7 +1779,7 @@ ContentEntry* SkPDFDevice::setUpContentEntry(const SkClipStack* clipStack, |
| return lastContentEntry; |
| } |
| - SkAutoTDelete<ContentEntry>* contentEntries = getContentEntries(); |
| + std::unique_ptr<ContentEntry>* contentEntries = getContentEntries(); |
| if (!lastContentEntry) { |
| contentEntries->reset(entry); |
| setLastContentEntry(entry); |
| @@ -1817,7 +1817,7 @@ void SkPDFDevice::finishContentEntry(SkXfermode::Mode xfermode, |
| // For DstOver, an empty content entry was inserted before the rest |
| // of the content entries. If nothing was drawn, it needs to be |
| // removed. |
| - SkAutoTDelete<ContentEntry>* contentEntries = getContentEntries(); |
| + std::unique_ptr<ContentEntry>* contentEntries = getContentEntries(); |
| contentEntries->reset(firstContentEntry->fNext.release()); |
| } |
| return; |