#include "src/pdf/SkPDFBitmap.h"
#include "include/codec/SkCodec.h"
#include "include/codec/SkEncodedOrigin.h"
#include "include/codec/SkJpegDecoder.h"
#include "include/core/SkAlphaType.h"
#include "include/core/SkBitmap.h"
#include "include/core/SkColor.h"
#include "include/core/SkColorPriv.h"
#include "include/core/SkColorSpace.h"
#include "include/core/SkColorType.h"
#include "include/core/SkData.h"
#include "include/core/SkExecutor.h"
#include "include/core/SkImage.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkPixmap.h"
#include "include/core/SkSize.h"
#include "include/core/SkStream.h"
#include "include/docs/SkPDFDocument.h"
#include "include/encode/SkICC.h"
#include "include/encode/SkJpegEncoder.h"
#include "include/private/SkEncodedInfo.h"
#include "include/private/base/SkAssert.h"
#include "include/private/base/SkMutex.h"
#include "include/private/base/SkTo.h"
#include "modules/skcms/skcms.h"
#include "src/core/SkTHash.h"
#include "src/pdf/SkDeflate.h"
#include "src/pdf/SkPDFDocumentPriv.h"
#include "src/pdf/SkPDFTypes.h"
#include "src/pdf/SkPDFUnion.h"
#include <algorithm>
#include <array>
#include <cstring>
#include <functional>
#include <memory>
#include <optional>
#include <utility>
const SkEncodedInfo& SkPDFBitmap::GetEncodedInfo(SkCodec& codec) { … }
namespace {
void fill_stream(SkWStream* out, char value, size_t n) { … }
SkColor get_neighbor_avg_color(const SkPixmap& bm, int xOrig, int yOrig) { … }
enum class SkPDFStreamFormat { … };
template <typename T>
void emit_image_stream(SkPDFDocument* doc,
SkPDFIndirectReference ref,
T writeStream,
SkISize size,
SkPDFUnion&& colorSpace,
SkPDFIndirectReference sMask,
int length,
SkPDFStreamFormat format) { … }
void do_deflated_alpha(const SkPixmap& pm, SkPDFDocument* doc, SkPDFIndirectReference ref) { … }
SkPDFUnion write_icc_profile(SkPDFDocument* doc, sk_sp<SkData>&& icc, int channels) { … }
bool icc_channel_mismatch(const skcms_ICCProfile* iccProfile, int expectedChannels) { … }
void do_deflated_image(const SkPixmap& pm,
SkPDFDocument* doc,
bool isOpaque,
SkPDFIndirectReference ref) { … }
bool do_jpeg(sk_sp<SkData> data, SkColorSpace* imageColorSpace, SkPDFDocument* doc, SkISize size,
SkPDFIndirectReference ref) { … }
SkBitmap to_pixels(const SkImage* image) { … }
void serialize_image(const SkImage* img,
int encodingQuality,
SkPDFDocument* doc,
SkPDFIndirectReference ref) { … }
}
SkPDFIndirectReference SkPDFSerializeImage(const SkImage* img,
SkPDFDocument* doc,
int encodingQuality) { … }