#include "include/docs/SkMultiPictureDocument.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkData.h"
#include "include/core/SkDocument.h"
#include "include/core/SkPicture.h"
#include "include/core/SkPictureRecorder.h"
#include "include/core/SkRect.h"
#include "include/core/SkScalar.h"
#include "include/core/SkSerialProcs.h"
#include "include/core/SkStream.h"
#include "include/private/base/SkDebug.h"
#include "include/private/base/SkTArray.h"
#include "include/private/base/SkTo.h"
#include "include/utils/SkNWayCanvas.h"
#include "src/utils/SkMultiPictureDocumentPriv.h"
#include <algorithm>
#include <climits>
#include <cstdint>
#include <cstring>
#include <functional>
#include <utility>
usingnamespaceskia_private;
namespace {
static constexpr char kMagic[] = …;
static constexpr char kEndPage[] = …;
const uint32_t kVersion = …;
static SkSize join(const TArray<SkSize>& sizes) { … }
struct MultiPictureDocument final : public SkDocument { … };
struct PagerCanvas : public SkNWayCanvas { … };
}
namespace SkMultiPictureDocument {
sk_sp<SkDocument> Make(SkWStream* dst,
const SkSerialProcs* procs,
std::function<void(const SkPicture*)> onEndPage) { … }
int ReadPageCount(SkStreamSeekable* src) { … }
bool ReadPageSizes(SkStreamSeekable* stream,
SkDocumentPage* dstArray,
int dstArrayCount) { … }
bool Read(SkStreamSeekable* src,
SkDocumentPage* dstArray,
int dstArrayCount,
const SkDeserialProcs* procs) { … }
}