aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-29 22:14:04 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-29 22:14:04 +0000
commite02944075840d672bd1797f3d945ff82d302282f (patch)
treef7d8130aae0c4752c1a03cb99378f0d6963407f6 /src/pdf
parent20146b3f7339d2c71c416397135e70e34f7fedb1 (diff)
Replace SkTScopedPtr with SkAutoTDelete in Skia.
BUG= R=djsollen@google.com, reed@google.com, vandebo@chromium.org Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/23621005 git-svn-id: http://skia.googlecode.com/svn/trunk@11016 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/pdf')
-rw-r--r--src/pdf/SkPDFDevice.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index 02dda02451..bd26311306 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -580,14 +580,14 @@ SkBaseDevice* 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;
}