Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: src/pdf/SkPDFDevice.cpp

Issue 12387086: Unwind PDFObject destructor calls into heap instead of stack. Notice: the order of the destructors … (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/pdf/SkPDFFormXObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | src/pdf/SkPDFFormXObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698