chromium/third_party/skia/src/core/SkPictureFlat.h

/*
 * Copyright 2011 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */
#ifndef SkPictureFlat_DEFINED
#define SkPictureFlat_DEFINED

#include "include/core/SkFlattenable.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkRegion.h"
#include "include/core/SkTypeface.h"
#include "include/private/base/SkAssert.h"
#include "include/private/base/SkTo.h"
#include "src/core/SkPicturePriv.h"
#include "src/core/SkReadBuffer.h"

#include <cstddef>
#include <cstdint>
#include <memory>

enum class SkClipOp;

/*
 * Note: While adding new DrawTypes, it is necessary to add to the end of this list
 *       and update LAST_DRAWTYPE_ENUM to avoid having the code read older skps wrong.
 *       (which can cause segfaults)
 *
 *       Reordering can be done during version updates.
 */
enum DrawType {};

enum DrawVertexFlags {};

enum DrawAtlasFlags {};

enum DrawTextRSXformFlags {};

enum SaveLayerRecFlatFlags {};

enum SaveBehindFlatFlags {};

///////////////////////////////////////////////////////////////////////////////
// clipparams are packed in 5 bits
//  doAA:1 | clipOp:4

// Newly serialized pictures will only write kIntersect or kDifference.
static inline uint32_t ClipParams_pack(SkClipOp op, bool doAA) {}

// But old SKPs may have been serialized with the SK_SUPPORT_DEPRECATED_CLIPOP flag, so might
// encounter expanding clip ops. Thus, this returns the clip op as the more general Region::Op.
static inline SkRegion::Op ClipParams_unpackRegionOp(SkReadBuffer* buffer, uint32_t packed) {}

static inline bool ClipParams_unpackDoAA(uint32_t packed) {}

///////////////////////////////////////////////////////////////////////////////

class SkTypefacePlayback {};

class SkFactoryPlayback {};

#endif