blob: 52ac59fea8c4dc54ebf6750258dda80629128027 [file] [log] [blame]
halcanary1b5c6042015-02-18 11:29:56 -08001/*
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.kollarovab8d6af12016-06-29 05:12:31 -070010#include "SkRefCnt.h"
halcanary1b5c6042015-02-18 11:29:56 -080011
halcanary7a14b312015-10-01 07:28:13 -070012class SkImage;
martina.kollarovab8d6af12016-06-29 05:12:31 -070013class SkPDFObject;
halcanary792c80f2015-02-20 07:21:05 -080014
halcanary1b5c6042015-02-18 11:29:56 -080015/**
halcanary7a14b312015-10-01 07:28:13 -070016 * SkPDFBitmap wraps a SkImage and serializes it as an image Xobject.
halcanary1b5c6042015-02-18 11:29:56 -080017 * It is designed to use a minimal amout of memory, aside from refing
halcanary7a14b312015-10-01 07:28:13 -070018 * the image, and its emitObject() does not cache any data.
Mike Reed2e3f2e92017-12-15 20:43:03 +000019 *
20 * quality > 100 means lossless
halcanary1b5c6042015-02-18 11:29:56 -080021 */
Mike Reed2e3f2e92017-12-15 20:43:03 +000022sk_sp<SkPDFObject> SkPDFCreateBitmapObject(sk_sp<SkImage>, int encodingQuality = 101);
halcanary1b5c6042015-02-18 11:29:56 -080023
24#endif // SkPDFBitmap_DEFINED