OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 The Android Open Source Project | 2 * Copyright 2010 The Android Open Source Project |
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 | 8 |
9 #ifndef SkPDFTypes_DEFINED | 9 #ifndef SkPDFTypes_DEFINED |
10 #define SkPDFTypes_DEFINED | 10 #define SkPDFTypes_DEFINED |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 typedef SkPDFObject INHERITED; | 324 typedef SkPDFObject INHERITED; |
325 }; | 325 }; |
326 | 326 |
327 /** \class SkPDFStream | 327 /** \class SkPDFStream |
328 | 328 |
329 This class takes an asset and assumes that it is the only owner of | 329 This class takes an asset and assumes that it is the only owner of |
330 the asset's data. It immediately compresses the asset to save | 330 the asset's data. It immediately compresses the asset to save |
331 memory. | 331 memory. |
332 */ | 332 */ |
333 | 333 |
334 class SkPDFStream : public SkPDFObject { | 334 class SkPDFStream final : public SkPDFObject { |
335 | 335 |
336 public: | 336 public: |
337 /** Create a PDF stream. A Length entry is automatically added to the | 337 /** Create a PDF stream. A Length entry is automatically added to the |
338 * stream dictionary. | 338 * stream dictionary. |
339 * @param data The data part of the stream. | 339 * @param data The data part of the stream. |
340 * @param stream The data part of the stream. */ | 340 * @param stream The data part of the stream. */ |
341 explicit SkPDFStream(sk_sp<SkData> data); | 341 explicit SkPDFStream(sk_sp<SkData> data); |
342 explicit SkPDFStream(std::unique_ptr<SkStreamAsset> stream); | 342 explicit SkPDFStream(std::unique_ptr<SkStreamAsset> stream); |
343 virtual ~SkPDFStream(); | 343 virtual ~SkPDFStream(); |
344 | 344 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 }; | 428 }; |
429 | 429 |
430 #ifdef SK_PDF_IMAGE_STATS | 430 #ifdef SK_PDF_IMAGE_STATS |
431 extern SkAtomic<int> gDrawImageCalls; | 431 extern SkAtomic<int> gDrawImageCalls; |
432 extern SkAtomic<int> gJpegImageObjects; | 432 extern SkAtomic<int> gJpegImageObjects; |
433 extern SkAtomic<int> gRegularImageObjects; | 433 extern SkAtomic<int> gRegularImageObjects; |
434 extern void SkPDFImageDumpStats(); | 434 extern void SkPDFImageDumpStats(); |
435 #endif // SK_PDF_IMAGE_STATS | 435 #endif // SK_PDF_IMAGE_STATS |
436 | 436 |
437 #endif | 437 #endif |
OLD | NEW |