diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-07-20 18:43:19 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-07-20 18:43:19 +0000 |
commit | 1feb33068b1313d2647c50b90ae8e0a3d510db2e (patch) | |
tree | 09f03935f8010baead080e9d77d761e690116019 /src/pdf | |
parent | 06f7f4051eeb299cb15b308edabd17344c183a36 (diff) |
replace SkRefPtr for parameters with simple pointers
git-svn-id: http://skia.googlecode.com/svn/trunk@1913 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/pdf')
-rw-r--r-- | src/pdf/SkPDFDevice.cpp | 4 | ||||
-rw-r--r-- | src/pdf/SkPDFDocument.cpp | 5 | ||||
-rw-r--r-- | src/pdf/SkPDFFormXObject.cpp | 2 | ||||
-rw-r--r-- | src/pdf/SkPDFPage.cpp | 4 | ||||
-rw-r--r-- | src/pdf/SkPDFShader.cpp | 2 |
5 files changed, 8 insertions, 9 deletions
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index caba8226b4..619d55d4c1 100644 --- a/src/pdf/SkPDFDevice.cpp +++ b/src/pdf/SkPDFDevice.cpp @@ -983,7 +983,7 @@ void SkPDFDevice::setDrawingArea(DrawingArea drawingArea) { fDrawingArea = drawingArea; } -const SkRefPtr<SkPDFDict>& SkPDFDevice::getResourceDict() { +SkPDFDict* SkPDFDevice::getResourceDict() { if (fResourceDict.get() == NULL) { fResourceDict = new SkPDFDict; fResourceDict->unref(); // SkRefPtr and new both took a reference. @@ -1048,7 +1048,7 @@ const SkRefPtr<SkPDFDict>& SkPDFDevice::getResourceDict() { procSets->appendName(procs[i]); fResourceDict->insert("ProcSet", procSets.get()); } - return fResourceDict; + return fResourceDict.get(); } void SkPDFDevice::getResources(SkTDArray<SkPDFObject*>* resourceList) const { diff --git a/src/pdf/SkPDFDocument.cpp b/src/pdf/SkPDFDocument.cpp index d60512e7ac..55aadf4077 100644 --- a/src/pdf/SkPDFDocument.cpp +++ b/src/pdf/SkPDFDocument.cpp @@ -165,8 +165,7 @@ bool SkPDFDocument::emitPDF(SkWStream* stream) { return true; } -bool SkPDFDocument::setPage(int pageNumber, - const SkRefPtr<SkPDFDevice>& pdfDevice) { +bool SkPDFDocument::setPage(int pageNumber, SkPDFDevice* pdfDevice) { if (fPageTree.count() != 0) { return false; } @@ -188,7 +187,7 @@ bool SkPDFDocument::setPage(int pageNumber, return true; } -bool SkPDFDocument::appendPage(const SkRefPtr<SkPDFDevice>& pdfDevice) { +bool SkPDFDocument::appendPage(SkPDFDevice* pdfDevice) { if (fPageTree.count() != 0) { return false; } diff --git a/src/pdf/SkPDFFormXObject.cpp b/src/pdf/SkPDFFormXObject.cpp index 0a75d2a25e..57745f8da1 100644 --- a/src/pdf/SkPDFFormXObject.cpp +++ b/src/pdf/SkPDFFormXObject.cpp @@ -36,7 +36,7 @@ SkPDFFormXObject::SkPDFFormXObject(SkPDFDevice* device) { insertName("Type", "XObject"); insertName("Subtype", "Form"); insert("BBox", device->getMediaBox().get()); - insert("Resources", device->getResourceDict().get()); + insert("Resources", device->getResourceDict()); // We invert the initial transform and apply that to the xobject so that // it doesn't get applied twice. We can't just undo it because it's diff --git a/src/pdf/SkPDFPage.cpp b/src/pdf/SkPDFPage.cpp index 3823f745d7..09849b0ac8 100644 --- a/src/pdf/SkPDFPage.cpp +++ b/src/pdf/SkPDFPage.cpp @@ -19,7 +19,7 @@ #include "SkPDFPage.h" #include "SkStream.h" -SkPDFPage::SkPDFPage(const SkRefPtr<SkPDFDevice>& content) +SkPDFPage::SkPDFPage(SkPDFDevice* content) : SkPDFDict("Page"), fDevice(content) { } @@ -29,7 +29,7 @@ SkPDFPage::~SkPDFPage() {} void SkPDFPage::finalizePage(SkPDFCatalog* catalog, bool firstPage, SkTDArray<SkPDFObject*>* resourceObjects) { if (fContentStream.get() == NULL) { - insert("Resources", fDevice->getResourceDict().get()); + insert("Resources", fDevice->getResourceDict()); insert("MediaBox", fDevice->getMediaBox().get()); SkRefPtr<SkStream> content = fDevice->content(); diff --git a/src/pdf/SkPDFShader.cpp b/src/pdf/SkPDFShader.cpp index ee225173b7..17f8b27742 100644 --- a/src/pdf/SkPDFShader.cpp +++ b/src/pdf/SkPDFShader.cpp @@ -707,7 +707,7 @@ SkPDFImageShader::SkPDFImageShader(SkPDFShader::State* state) : fState(state) { insert("BBox", patternBBoxArray.get()); insertScalar("XStep", patternBBox.width()); insertScalar("YStep", patternBBox.height()); - insert("Resources", pattern.getResourceDict().get()); + insert("Resources", pattern.getResourceDict()); insert("Matrix", SkPDFUtils::MatrixToArray(finalMatrix))->unref(); fState.get()->fImage.unlockPixels(); |