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

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

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 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
« no previous file with comments | « src/pdf/SkPDFCanon.cpp ('k') | src/pdf/SkPDFDevice.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 #ifndef SkPDFDevice_DEFINED 8 #ifndef SkPDFDevice_DEFINED
9 #define SkPDFDevice_DEFINED 9 #define SkPDFDevice_DEFINED
10 10
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 * @param dict Dictionary to add destinations to. 145 * @param dict Dictionary to add destinations to.
146 * @param page The PDF object representing the page for this device. 146 * @param page The PDF object representing the page for this device.
147 */ 147 */
148 void appendDestinations(SkPDFDict* dict, SkPDFObject* page) const; 148 void appendDestinations(SkPDFDict* dict, SkPDFObject* page) const;
149 149
150 /** Returns a copy of the media box for this device. The caller is required 150 /** Returns a copy of the media box for this device. The caller is required
151 * to unref() this when it is finished. 151 * to unref() this when it is finished.
152 */ 152 */
153 SkPDFArray* copyMediaBox() const; 153 SkPDFArray* copyMediaBox() const;
154 154
155 /** Get the annotations from this page, or NULL if there are none. 155 /** Get the annotations from this page, or nullptr if there are none.
156 */ 156 */
157 SkPDFArray* getAnnotations() const { return fAnnotations; } 157 SkPDFArray* getAnnotations() const { return fAnnotations; }
158 158
159 /** Returns a SkStream with the page contents. The caller is responsible 159 /** Returns a SkStream with the page contents. The caller is responsible
160 * for a deleting the returned value. 160 * for a deleting the returned value.
161 */ 161 */
162 SkStreamAsset* content() const; 162 SkStreamAsset* content() const;
163 163
164 /** Writes the page contents to the stream. */ 164 /** Writes the page contents to the stream. */
165 void writeContent(SkWStream*) const; 165 void writeContent(SkWStream*) const;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 SkPDFFormXObject* createFormXObjectFromDevice(); 240 SkPDFFormXObject* createFormXObjectFromDevice();
241 241
242 void drawFormXObjectWithMask(int xObjectIndex, 242 void drawFormXObjectWithMask(int xObjectIndex,
243 SkPDFFormXObject* mask, 243 SkPDFFormXObject* mask,
244 const SkClipStack* clipStack, 244 const SkClipStack* clipStack,
245 const SkRegion& clipRegion, 245 const SkRegion& clipRegion,
246 SkXfermode::Mode mode, 246 SkXfermode::Mode mode,
247 bool invertClip); 247 bool invertClip);
248 248
249 // If the paint or clip is such that we shouldn't draw anything, this 249 // If the paint or clip is such that we shouldn't draw anything, this
250 // returns NULL and does not create a content entry. 250 // returns nullptr and does not create a content entry.
251 // setUpContentEntry and finishContentEntry can be used directly, but 251 // setUpContentEntry and finishContentEntry can be used directly, but
252 // the preferred method is to use the ScopedContentEntry helper class. 252 // the preferred method is to use the ScopedContentEntry helper class.
253 ContentEntry* setUpContentEntry(const SkClipStack* clipStack, 253 ContentEntry* setUpContentEntry(const SkClipStack* clipStack,
254 const SkRegion& clipRegion, 254 const SkRegion& clipRegion,
255 const SkMatrix& matrix, 255 const SkMatrix& matrix,
256 const SkPaint& paint, 256 const SkPaint& paint,
257 bool hasText, 257 bool hasText,
258 SkPDFFormXObject** dst); 258 SkPDFFormXObject** dst);
259 void finishContentEntry(SkXfermode::Mode xfermode, 259 void finishContentEntry(SkXfermode::Mode xfermode,
260 SkPDFFormXObject* dst, 260 SkPDFFormXObject* dst,
(...skipping 20 matching lines...) Expand all
281 const SkIRect* srcRect, 281 const SkIRect* srcRect,
282 const SkPaint& paint); 282 const SkPaint& paint);
283 283
284 /** Helper method for copyContentToData. It is responsible for copying the 284 /** Helper method for copyContentToData. It is responsible for copying the
285 * list of content entries |entry| to |data|. 285 * list of content entries |entry| to |data|.
286 */ 286 */
287 void copyContentEntriesToData(ContentEntry* entry, SkWStream* data) const; 287 void copyContentEntriesToData(ContentEntry* entry, SkWStream* data) const;
288 288
289 bool handleInversePath(const SkDraw& d, const SkPath& origPath, 289 bool handleInversePath(const SkDraw& d, const SkPath& origPath,
290 const SkPaint& paint, bool pathIsMutable, 290 const SkPaint& paint, bool pathIsMutable,
291 const SkMatrix* prePathMatrix = NULL); 291 const SkMatrix* prePathMatrix = nullptr);
292 bool handlePointAnnotation(const SkPoint* points, size_t count, 292 bool handlePointAnnotation(const SkPoint* points, size_t count,
293 const SkMatrix& matrix, SkAnnotation* annot); 293 const SkMatrix& matrix, SkAnnotation* annot);
294 void addAnnotation(SkPDFDict*); 294 void addAnnotation(SkPDFDict*);
295 295
296 typedef SkBaseDevice INHERITED; 296 typedef SkBaseDevice INHERITED;
297 297
298 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to create 298 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to create
299 // an SkPDFDevice 299 // an SkPDFDevice
300 //friend class SkDocument_PDF; 300 //friend class SkDocument_PDF;
301 //friend class SkPDFImageShader; 301 //friend class SkPDFImageShader;
302 }; 302 };
303 303
304 #endif 304 #endif
OLDNEW
« no previous file with comments | « src/pdf/SkPDFCanon.cpp ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698