summaryrefslogtreecommitdiff
path: root/pdf
diff options
context:
space:
mode:
authorvandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-02-01 01:04:00 +0000
committervandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-02-01 01:04:00 +0000
commite527c874f27b655d90322141c06f7ec956dc5426 (patch)
tree9a273ebf8e6ac127ce620df7c618c9776d7f4d8a /pdf
parent9e4f15cf5552d239f74a73ad139a492119464f56 (diff)
downloadsrc-e527c874f27b655d90322141c06f7ec956dc5426.tar.gz
[PDF] Fix bugs preventing gm from running with PDF support.
Fix copy-paste ref counting bug. Change NOT_IMPLEMENTED macro to only assert in debug mode. Review URL: http://codereview.appspot.com/4080048 git-svn-id: http://skia.googlecode.com/svn/trunk/src@748 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'pdf')
-rw-r--r--pdf/SkPDFDevice.cpp2
-rw-r--r--pdf/SkPDFImage.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/pdf/SkPDFDevice.cpp b/pdf/SkPDFDevice.cpp
index d3a15a8b..3ca74098 100644
--- a/pdf/SkPDFDevice.cpp
+++ b/pdf/SkPDFDevice.cpp
@@ -36,7 +36,7 @@
do { \
if (condition) { \
fprintf(stderr, "NOT_IMPLEMENTED: " #condition "\n"); \
- SkASSERT(!assert); \
+ SkDEBUGCODE(SkASSERT(!assert);) \
} \
} while(0)
diff --git a/pdf/SkPDFImage.cpp b/pdf/SkPDFImage.cpp
index 6c35f5a6..f3f75925 100644
--- a/pdf/SkPDFImage.cpp
+++ b/pdf/SkPDFImage.cpp
@@ -228,8 +228,8 @@ SkPDFArray* makeIndexedColorSpace(SkColorTable* table) {
rgbName->unref(); // SkRefPtr and new both took a reference.
result->append(rgbName.get());
- rgbName->unref(); // SkRefPtr and new both took a reference.
SkRefPtr<SkPDFInt> countValue = new SkPDFInt(table->count() - 1);
+ countValue->unref(); // SkRefPtr and new both took a reference.
result->append(countValue.get());
// Potentially, this could be represented in fewer bytes with a stream.