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

Side by Side Diff: include/pdf/SkPDFDevice.h

Issue 23621005: Replace SkTScopedPtr with SkAutoTDelete in Skia. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: port class comment Created 7 years, 3 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 | « include/core/SkTemplates.h ('k') | include/pdf/SkPDFDocument.h » ('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 #ifndef SkPDFDevice_DEFINED 10 #ifndef SkPDFDevice_DEFINED
11 #define SkPDFDevice_DEFINED 11 #define SkPDFDevice_DEFINED
12 12
13 #include "SkCanvas.h" 13 #include "SkCanvas.h"
14 #include "SkDevice.h" 14 #include "SkDevice.h"
15 #include "SkPaint.h" 15 #include "SkPaint.h"
16 #include "SkPath.h" 16 #include "SkPath.h"
17 #include "SkRect.h" 17 #include "SkRect.h"
18 #include "SkRefCnt.h" 18 #include "SkRefCnt.h"
19 #include "SkStream.h" 19 #include "SkStream.h"
20 #include "SkTDArray.h" 20 #include "SkTDArray.h"
21 #include "SkTScopedPtr.h" 21 #include "SkTemplates.h"
22 22
23 class SkPDFArray; 23 class SkPDFArray;
24 class SkPDFDevice; 24 class SkPDFDevice;
25 class SkPDFDict; 25 class SkPDFDict;
26 class SkPDFFont; 26 class SkPDFFont;
27 class SkPDFFormXObject; 27 class SkPDFFormXObject;
28 class SkPDFGlyphSetMap; 28 class SkPDFGlyphSetMap;
29 class SkPDFGraphicState; 29 class SkPDFGraphicState;
30 class SkPDFObject; 30 class SkPDFObject;
31 class SkPDFResourceDict; 31 class SkPDFResourceDict;
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 SkRegion fExistingClipRegion; 209 SkRegion fExistingClipRegion;
210 SkPDFArray* fAnnotations; 210 SkPDFArray* fAnnotations;
211 SkPDFResourceDict* fResourceDict; 211 SkPDFResourceDict* fResourceDict;
212 SkTDArray<NamedDestination*> fNamedDestinations; 212 SkTDArray<NamedDestination*> fNamedDestinations;
213 213
214 SkTDArray<SkPDFGraphicState*> fGraphicStateResources; 214 SkTDArray<SkPDFGraphicState*> fGraphicStateResources;
215 SkTDArray<SkPDFObject*> fXObjectResources; 215 SkTDArray<SkPDFObject*> fXObjectResources;
216 SkTDArray<SkPDFFont*> fFontResources; 216 SkTDArray<SkPDFFont*> fFontResources;
217 SkTDArray<SkPDFObject*> fShaderResources; 217 SkTDArray<SkPDFObject*> fShaderResources;
218 218
219 SkTScopedPtr<ContentEntry> fContentEntries; 219 SkAutoTDelete<ContentEntry> fContentEntries;
220 ContentEntry* fLastContentEntry; 220 ContentEntry* fLastContentEntry;
221 SkTScopedPtr<ContentEntry> fMarginContentEntries; 221 SkAutoTDelete<ContentEntry> fMarginContentEntries;
222 ContentEntry* fLastMarginContentEntry; 222 ContentEntry* fLastMarginContentEntry;
223 DrawingArea fDrawingArea; 223 DrawingArea fDrawingArea;
224 224
225 const SkClipStack* fClipStack; 225 const SkClipStack* fClipStack;
226 226
227 // Accessor and setter functions based on the current DrawingArea. 227 // Accessor and setter functions based on the current DrawingArea.
228 SkTScopedPtr<ContentEntry>* getContentEntries(); 228 SkAutoTDelete<ContentEntry>* getContentEntries();
229 ContentEntry* getLastContentEntry(); 229 ContentEntry* getLastContentEntry();
230 void setLastContentEntry(ContentEntry* contentEntry); 230 void setLastContentEntry(ContentEntry* contentEntry);
231 231
232 // Glyph ids used for each font on this device. 232 // Glyph ids used for each font on this device.
233 SkTScopedPtr<SkPDFGlyphSetMap> fFontGlyphUsage; 233 SkAutoTDelete<SkPDFGlyphSetMap> fFontGlyphUsage;
234 234
235 EncodeToDCTStream fEncoder; 235 EncodeToDCTStream fEncoder;
236 236
237 SkPDFDevice(const SkISize& layerSize, const SkClipStack& existingClipStack, 237 SkPDFDevice(const SkISize& layerSize, const SkClipStack& existingClipStack,
238 const SkRegion& existingClipRegion); 238 const SkRegion& existingClipRegion);
239 239
240 // override from SkDevice 240 // override from SkDevice
241 virtual SkDevice* onCreateCompatibleDevice(SkBitmap::Config config, 241 virtual SkDevice* onCreateCompatibleDevice(SkBitmap::Config config,
242 int width, int height, 242 int width, int height,
243 bool isOpaque, 243 bool isOpaque,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 const SkMatrix& matrix); 307 const SkMatrix& matrix);
308 void handleLinkToNamedDest(SkData* nameData, const SkRect& r, 308 void handleLinkToNamedDest(SkData* nameData, const SkRect& r,
309 const SkMatrix& matrix); 309 const SkMatrix& matrix);
310 void defineNamedDestination(SkData* nameData, const SkPoint& point, 310 void defineNamedDestination(SkData* nameData, const SkPoint& point,
311 const SkMatrix& matrix); 311 const SkMatrix& matrix);
312 312
313 typedef SkDevice INHERITED; 313 typedef SkDevice INHERITED;
314 }; 314 };
315 315
316 #endif 316 #endif
OLDNEW
« no previous file with comments | « include/core/SkTemplates.h ('k') | include/pdf/SkPDFDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698