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

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

Issue 1811723002: free -> reset (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: zarro boogs found Created 4 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
« no previous file with comments | « src/images/SkImageDecoder_libwebp.cpp ('k') | src/utils/SkBitSet.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 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkPDFDevice.h" 8 #include "SkPDFDevice.h"
9 9
10 #include "SkAnnotationKeys.h" 10 #include "SkAnnotationKeys.h"
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 } else { 725 } else {
726 fInitialTransform.setIdentity(); 726 fInitialTransform.setIdentity();
727 } 727 }
728 } 728 }
729 729
730 SkPDFDevice::~SkPDFDevice() { 730 SkPDFDevice::~SkPDFDevice() {
731 this->cleanUp(true); 731 this->cleanUp(true);
732 } 732 }
733 733
734 void SkPDFDevice::init() { 734 void SkPDFDevice::init() {
735 fContentEntries.free(); 735 fContentEntries.reset();
736 fLastContentEntry = nullptr; 736 fLastContentEntry = nullptr;
737 fMarginContentEntries.free(); 737 fMarginContentEntries.reset();
738 fLastMarginContentEntry = nullptr; 738 fLastMarginContentEntry = nullptr;
739 fDrawingArea = kContent_DrawingArea; 739 fDrawingArea = kContent_DrawingArea;
740 if (fFontGlyphUsage.get() == nullptr) { 740 if (fFontGlyphUsage.get() == nullptr) {
741 fFontGlyphUsage.reset(new SkPDFGlyphSetMap); 741 fFontGlyphUsage.reset(new SkPDFGlyphSetMap);
742 } 742 }
743 } 743 }
744 744
745 void SkPDFDevice::cleanUp(bool clearFontUsage) { 745 void SkPDFDevice::cleanUp(bool clearFontUsage) {
746 fGraphicStateResources.unrefAll(); 746 fGraphicStateResources.unrefAll();
747 fXObjectResources.unrefAll(); 747 fXObjectResources.unrefAll();
(...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after
2329 pdfimage.reset(SkPDFCreateBitmapObject( 2329 pdfimage.reset(SkPDFCreateBitmapObject(
2330 image, fCanon->getPixelSerializer())); 2330 image, fCanon->getPixelSerializer()));
2331 if (!pdfimage) { 2331 if (!pdfimage) {
2332 return; 2332 return;
2333 } 2333 }
2334 fCanon->addPDFBitmap(image->uniqueID(), pdfimage.get()); 2334 fCanon->addPDFBitmap(image->uniqueID(), pdfimage.get());
2335 } 2335 }
2336 SkPDFUtils::DrawFormXObject(this->addXObjectResource(pdfimage.get()), 2336 SkPDFUtils::DrawFormXObject(this->addXObjectResource(pdfimage.get()),
2337 &content.entry()->fContent); 2337 &content.entry()->fContent);
2338 } 2338 }
OLDNEW
« no previous file with comments | « src/images/SkImageDecoder_libwebp.cpp ('k') | src/utils/SkBitSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698