| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #include "SkPDFDevice.h" | 10 #include "SkPDFDevice.h" |
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 } | 638 } |
| 639 } | 639 } |
| 640 | 640 |
| 641 void SkPDFDevice::cleanUp(bool clearFontUsage) { | 641 void SkPDFDevice::cleanUp(bool clearFontUsage) { |
| 642 fGraphicStateResources.unrefAll(); | 642 fGraphicStateResources.unrefAll(); |
| 643 fXObjectResources.unrefAll(); | 643 fXObjectResources.unrefAll(); |
| 644 fFontResources.unrefAll(); | 644 fFontResources.unrefAll(); |
| 645 fShaderResources.unrefAll(); | 645 fShaderResources.unrefAll(); |
| 646 SkSafeUnref(fAnnotations); | 646 SkSafeUnref(fAnnotations); |
| 647 SkSafeUnref(fResourceDict); | 647 SkSafeUnref(fResourceDict); |
| 648 /* |
| 649 // Transfer ownership of fResourceDict to list. |
| 650 SkTDArray<SkPDFObject*> list; |
| 651 list.push(fResourceDict); |
| 652 fResourceDict = NULL; |
| 648 | 653 |
| 654 SkPDFObject::safeUnref(&list); |
| 655 */ |
| 649 if (clearFontUsage) { | 656 if (clearFontUsage) { |
| 650 fFontGlyphUsage->reset(); | 657 fFontGlyphUsage->reset(); |
| 651 } | 658 } |
| 652 } | 659 } |
| 653 | 660 |
| 654 uint32_t SkPDFDevice::getDeviceCapabilities() { | 661 uint32_t SkPDFDevice::getDeviceCapabilities() { |
| 655 return kVector_Capability; | 662 return kVector_Capability; |
| 656 } | 663 } |
| 657 | 664 |
| 658 void SkPDFDevice::clear(SkColor color) { | 665 void SkPDFDevice::clear(SkColor color) { |
| (...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1720 } | 1727 } |
| 1721 | 1728 |
| 1722 bool SkPDFDevice::onReadPixels(const SkBitmap& bitmap, int x, int y, | 1729 bool SkPDFDevice::onReadPixels(const SkBitmap& bitmap, int x, int y, |
| 1723 SkCanvas::Config8888) { | 1730 SkCanvas::Config8888) { |
| 1724 return false; | 1731 return false; |
| 1725 } | 1732 } |
| 1726 | 1733 |
| 1727 bool SkPDFDevice::allowImageFilter(SkImageFilter*) { | 1734 bool SkPDFDevice::allowImageFilter(SkImageFilter*) { |
| 1728 return false; | 1735 return false; |
| 1729 } | 1736 } |
| OLD | NEW |