| OLD | NEW |
| 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 SkPDFDocument* doc, | 264 SkPDFDocument* doc, |
| 265 bool flip); | 265 bool flip); |
| 266 | 266 |
| 267 SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override; | 267 SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override; |
| 268 | 268 |
| 269 void init(); | 269 void init(); |
| 270 void cleanUp(); | 270 void cleanUp(); |
| 271 sk_sp<SkPDFObject> makeFormXObjectFromDevice(); | 271 sk_sp<SkPDFObject> makeFormXObjectFromDevice(); |
| 272 | 272 |
| 273 void drawFormXObjectWithMask(int xObjectIndex, | 273 void drawFormXObjectWithMask(int xObjectIndex, |
| 274 SkPDFObject* mask, | 274 sk_sp<SkPDFObject> mask, |
| 275 const SkClipStack* clipStack, | 275 const SkClipStack* clipStack, |
| 276 const SkRegion& clipRegion, | 276 const SkRegion& clipRegion, |
| 277 SkXfermode::Mode mode, | 277 SkXfermode::Mode mode, |
| 278 bool invertClip); | 278 bool invertClip); |
| 279 | 279 |
| 280 // If the paint or clip is such that we shouldn't draw anything, this | 280 // If the paint or clip is such that we shouldn't draw anything, this |
| 281 // returns nullptr and does not create a content entry. | 281 // returns nullptr and does not create a content entry. |
| 282 // setUpContentEntry and finishContentEntry can be used directly, but | 282 // setUpContentEntry and finishContentEntry can be used directly, but |
| 283 // the preferred method is to use the ScopedContentEntry helper class. | 283 // the preferred method is to use the ScopedContentEntry helper class. |
| 284 ContentEntry* setUpContentEntry(const SkClipStack* clipStack, | 284 ContentEntry* setUpContentEntry(const SkClipStack* clipStack, |
| 285 const SkRegion& clipRegion, | 285 const SkRegion& clipRegion, |
| 286 const SkMatrix& matrix, | 286 const SkMatrix& matrix, |
| 287 const SkPaint& paint, | 287 const SkPaint& paint, |
| 288 bool hasText, | 288 bool hasText, |
| 289 SkPDFObject** dst); | 289 sk_sp<SkPDFObject>* dst); |
| 290 void finishContentEntry(SkXfermode::Mode xfermode, | 290 void finishContentEntry(SkXfermode::Mode xfermode, |
| 291 SkPDFObject* dst, | 291 sk_sp<SkPDFObject> dst, |
| 292 SkPath* shape); | 292 SkPath* shape); |
| 293 bool isContentEmpty(); | 293 bool isContentEmpty(); |
| 294 | 294 |
| 295 void populateGraphicStateEntryFromPaint(const SkMatrix& matrix, | 295 void populateGraphicStateEntryFromPaint(const SkMatrix& matrix, |
| 296 const SkClipStack& clipStack, | 296 const SkClipStack& clipStack, |
| 297 const SkRegion& clipRegion, | 297 const SkRegion& clipRegion, |
| 298 const SkPaint& paint, | 298 const SkPaint& paint, |
| 299 bool hasText, | 299 bool hasText, |
| 300 GraphicStateEntry* entry); | 300 GraphicStateEntry* entry); |
| 301 int addGraphicStateResource(SkPDFObject* gs); | 301 int addGraphicStateResource(SkPDFObject* gs); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 320 | 320 |
| 321 typedef SkBaseDevice INHERITED; | 321 typedef SkBaseDevice INHERITED; |
| 322 | 322 |
| 323 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to
create | 323 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to
create |
| 324 // an SkPDFDevice | 324 // an SkPDFDevice |
| 325 //friend class SkDocument_PDF; | 325 //friend class SkDocument_PDF; |
| 326 //friend class SkPDFImageShader; | 326 //friend class SkPDFImageShader; |
| 327 }; | 327 }; |
| 328 | 328 |
| 329 #endif | 329 #endif |
| OLD | NEW |