| 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 191 |
| 192 SkPDFCanon* getCanon() const { return fCanon; } | 192 SkPDFCanon* getCanon() const { return fCanon; } |
| 193 | 193 |
| 194 protected: | 194 protected: |
| 195 const SkBitmap& onAccessBitmap() override { | 195 const SkBitmap& onAccessBitmap() override { |
| 196 return fLegacyBitmap; | 196 return fLegacyBitmap; |
| 197 } | 197 } |
| 198 | 198 |
| 199 SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) override; | 199 SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) override; |
| 200 | 200 |
| 201 void drawAnnotation(const SkDraw&, const SkRect&, const char key[], SkData*
value) override; |
| 202 |
| 201 private: | 203 private: |
| 202 // TODO(vandebo): push most of SkPDFDevice's state into a core object in | 204 // TODO(vandebo): push most of SkPDFDevice's state into a core object in |
| 203 // order to get the right access levels without using friend. | 205 // order to get the right access levels without using friend. |
| 204 friend class ScopedContentEntry; | 206 friend class ScopedContentEntry; |
| 205 | 207 |
| 206 SkISize fPageSize; | 208 SkISize fPageSize; |
| 207 SkISize fContentSize; | 209 SkISize fContentSize; |
| 208 SkMatrix fInitialTransform; | 210 SkMatrix fInitialTransform; |
| 209 SkClipStack fExistingClipStack; | 211 SkClipStack fExistingClipStack; |
| 210 SkRegion fExistingClipRegion; | 212 SkRegion fExistingClipRegion; |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 const SkPaint& paint); | 298 const SkPaint& paint); |
| 297 | 299 |
| 298 /** Helper method for copyContentToData. It is responsible for copying the | 300 /** Helper method for copyContentToData. It is responsible for copying the |
| 299 * list of content entries |entry| to |data|. | 301 * list of content entries |entry| to |data|. |
| 300 */ | 302 */ |
| 301 void copyContentEntriesToData(ContentEntry* entry, SkWStream* data) const; | 303 void copyContentEntriesToData(ContentEntry* entry, SkWStream* data) const; |
| 302 | 304 |
| 303 bool handleInversePath(const SkDraw& d, const SkPath& origPath, | 305 bool handleInversePath(const SkDraw& d, const SkPath& origPath, |
| 304 const SkPaint& paint, bool pathIsMutable, | 306 const SkPaint& paint, bool pathIsMutable, |
| 305 const SkMatrix* prePathMatrix = nullptr); | 307 const SkMatrix* prePathMatrix = nullptr); |
| 306 bool handlePointAnnotation(const SkPoint* points, size_t count, | 308 void handlePointAnnotation(const SkPoint&, const SkMatrix&, const char key[]
, SkData* value); |
| 307 const SkMatrix& matrix, SkAnnotation* annot); | 309 void handlePathAnnotation(const SkPath&, const SkDraw& d, const char key[],
SkData* value); |
| 308 bool handlePathAnnotation(const SkPath& path, const SkDraw& d, | |
| 309 SkAnnotation* annot); | |
| 310 | 310 |
| 311 typedef SkBaseDevice INHERITED; | 311 typedef SkBaseDevice INHERITED; |
| 312 | 312 |
| 313 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to
create | 313 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to
create |
| 314 // an SkPDFDevice | 314 // an SkPDFDevice |
| 315 //friend class SkDocument_PDF; | 315 //friend class SkDocument_PDF; |
| 316 //friend class SkPDFImageShader; | 316 //friend class SkPDFImageShader; |
| 317 }; | 317 }; |
| 318 | 318 |
| 319 #endif | 319 #endif |
| OLD | NEW |