halcanary | 1b5c604 | 2015-02-18 11:29:56 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | #ifndef SkPDFBitmap_DEFINED |
| 8 | #define SkPDFBitmap_DEFINED |
| 9 | |
martina.kollarova | b8d6af1 | 2016-06-29 05:12:31 -0700 | [diff] [blame] | 10 | #include "SkRefCnt.h" |
halcanary | 1b5c604 | 2015-02-18 11:29:56 -0800 | [diff] [blame] | 11 | |
halcanary | 7a14b31 | 2015-10-01 07:28:13 -0700 | [diff] [blame] | 12 | class SkImage; |
martina.kollarova | b8d6af1 | 2016-06-29 05:12:31 -0700 | [diff] [blame] | 13 | class SkPDFObject; |
halcanary | 792c80f | 2015-02-20 07:21:05 -0800 | [diff] [blame] | 14 | |
halcanary | 1b5c604 | 2015-02-18 11:29:56 -0800 | [diff] [blame] | 15 | /** |
halcanary | 7a14b31 | 2015-10-01 07:28:13 -0700 | [diff] [blame] | 16 | * SkPDFBitmap wraps a SkImage and serializes it as an image Xobject. |
halcanary | 1b5c604 | 2015-02-18 11:29:56 -0800 | [diff] [blame] | 17 | * It is designed to use a minimal amout of memory, aside from refing |
halcanary | 7a14b31 | 2015-10-01 07:28:13 -0700 | [diff] [blame] | 18 | * the image, and its emitObject() does not cache any data. |
Mike Reed | 2e3f2e9 | 2017-12-15 20:43:03 +0000 | [diff] [blame] | 19 | * |
| 20 | * quality > 100 means lossless |
halcanary | 1b5c604 | 2015-02-18 11:29:56 -0800 | [diff] [blame] | 21 | */ |
Mike Reed | 2e3f2e9 | 2017-12-15 20:43:03 +0000 | [diff] [blame] | 22 | sk_sp<SkPDFObject> SkPDFCreateBitmapObject(sk_sp<SkImage>, int encodingQuality = 101); |
halcanary | 1b5c604 | 2015-02-18 11:29:56 -0800 | [diff] [blame] | 23 | |
| 24 | #endif // SkPDFBitmap_DEFINED |