| Index: src/pdf/SkPDFDevice.cpp
|
| diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
|
| index a24c4ecd8ae6373bb1a325d2c377d897f6395397..26b211c89bd3c7d6a7afe669a710925b383f48dc 100644
|
| --- a/src/pdf/SkPDFDevice.cpp
|
| +++ b/src/pdf/SkPDFDevice.cpp
|
| @@ -580,14 +580,14 @@ SkDevice* SkPDFDevice::onCreateCompatibleDevice(SkBitmap::Config config,
|
| struct ContentEntry {
|
| GraphicStateEntry fState;
|
| SkDynamicMemoryWStream fContent;
|
| - SkTScopedPtr<ContentEntry> fNext;
|
| + SkAutoTDelete<ContentEntry> fNext;
|
|
|
| // If the stack is too deep we could get Stack Overflow.
|
| // So we manually destruct the object.
|
| ~ContentEntry() {
|
| - ContentEntry* val = fNext.release();
|
| + ContentEntry* val = fNext.detach();
|
| while (val != NULL) {
|
| - ContentEntry* valNext = val->fNext.release();
|
| + ContentEntry* valNext = val->fNext.detach();
|
| // When the destructor is called, fNext is NULL and exits.
|
| delete val;
|
| val = valNext;
|
| @@ -715,12 +715,12 @@ SkPDFDevice::~SkPDFDevice() {
|
| void SkPDFDevice::init() {
|
| fAnnotations = NULL;
|
| fResourceDict = NULL;
|
| - fContentEntries.reset();
|
| + fContentEntries.free();
|
| fLastContentEntry = NULL;
|
| - fMarginContentEntries.reset();
|
| + fMarginContentEntries.free();
|
| fLastMarginContentEntry = NULL;
|
| fDrawingArea = kContent_DrawingArea;
|
| - if (fFontGlyphUsage == NULL) {
|
| + if (fFontGlyphUsage.get() == NULL) {
|
| fFontGlyphUsage.reset(new SkPDFGlyphSetMap());
|
| }
|
| }
|
| @@ -1204,7 +1204,7 @@ ContentEntry* SkPDFDevice::getLastContentEntry() {
|
| }
|
| }
|
|
|
| -SkTScopedPtr<ContentEntry>* SkPDFDevice::getContentEntries() {
|
| +SkAutoTDelete<ContentEntry>* SkPDFDevice::getContentEntries() {
|
| if (fDrawingArea == kContent_DrawingArea) {
|
| return &fContentEntries;
|
| } else {
|
| @@ -1650,7 +1650,7 @@ ContentEntry* SkPDFDevice::setUpContentEntry(const SkClipStack* clipStack,
|
| }
|
|
|
| ContentEntry* entry;
|
| - SkTScopedPtr<ContentEntry> newEntry;
|
| + SkAutoTDelete<ContentEntry> newEntry;
|
|
|
| ContentEntry* lastContentEntry = getLastContentEntry();
|
| if (lastContentEntry && lastContentEntry->fContent.getOffset() == 0) {
|
| @@ -1667,18 +1667,18 @@ ContentEntry* SkPDFDevice::setUpContentEntry(const SkClipStack* clipStack,
|
| return lastContentEntry;
|
| }
|
|
|
| - SkTScopedPtr<ContentEntry>* contentEntries = getContentEntries();
|
| + SkAutoTDelete<ContentEntry>* contentEntries = getContentEntries();
|
| if (!lastContentEntry) {
|
| contentEntries->reset(entry);
|
| setLastContentEntry(entry);
|
| } else if (xfermode == SkXfermode::kDstOver_Mode) {
|
| - entry->fNext.reset(contentEntries->release());
|
| + entry->fNext.reset(contentEntries->detach());
|
| contentEntries->reset(entry);
|
| } else {
|
| lastContentEntry->fNext.reset(entry);
|
| setLastContentEntry(entry);
|
| }
|
| - newEntry.release();
|
| + newEntry.detach();
|
| return entry;
|
| }
|
|
|
|
|