diff options
author | 2011-02-01 01:04:00 +0000 | |
---|---|---|
committer | 2011-02-01 01:04:00 +0000 | |
commit | fb697e7a37adf34cbafaedb94cc373e7b6d1fa57 (patch) | |
tree | 50ddbe78969fdd05f11a8176a306a73cac7ceaf9 /src/pdf | |
parent | 1cfa2c458626abe952a63b1a9397d8e496a134d6 (diff) |
[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@748 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/pdf')
-rw-r--r-- | src/pdf/SkPDFDevice.cpp | 2 | ||||
-rw-r--r-- | src/pdf/SkPDFImage.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index d3a15a8b43..3ca740980e 100644 --- a/src/pdf/SkPDFDevice.cpp +++ b/src/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/src/pdf/SkPDFImage.cpp b/src/pdf/SkPDFImage.cpp index 6c35f5a6a6..f3f75925ce 100644 --- a/src/pdf/SkPDFImage.cpp +++ b/src/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. |