chromium/cc/paint/paint_op_writer.h

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#ifndef CC_PAINT_PAINT_OP_WRITER_H_
#define CC_PAINT_PAINT_OP_WRITER_H_

#include <memory>
#include <type_traits>
#include <vector>

#include "base/bits.h"
#include "base/memory/aligned_memory.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/stack_allocated.h"
#include "base/numerics/checked_math.h"
#include "cc/paint/paint_canvas.h"
#include "cc/paint/paint_export.h"
#include "cc/paint/paint_filter.h"
#include "cc/paint/paint_op_buffer_serializer.h"
#include "third_party/skia/include/core/SkImageInfo.h"
#include "third_party/skia/include/core/SkRefCnt.h"
#include "third_party/skia/include/core/SkYUVAInfo.h"
#include "third_party/skia/include/effects/SkGradientShader.h"

struct SkGainmapInfo;
struct SkHighContrastConfig;
struct SkRect;
struct SkIRect;
class SkM44;
class SkRRect;
namespace sktext::gpu {
class Slug;
}

namespace gfx {
struct HDRMetadata;
}

namespace gpu {
struct Mailbox;
}

namespace cc {

class ColorFilter;
class DecodedDrawImage;
class DrawImage;
class DrawLooper;
class PaintShader;
class PathEffect;

class CC_PAINT_EXPORT PaintOpWriter {};

template <typename T>
constexpr size_t PaintOpWriter::SerializedSizeSimple() {}

// size_t is always serialized as two uint32_ts to make the serialized result
// portable between 32bit and 64bit processes.
template <>
constexpr size_t PaintOpWriter::SerializedSizeSimple<size_t>() {}

template <typename T>
constexpr size_t PaintOpWriter::SerializedSize() {}
template <typename T>
constexpr size_t PaintOpWriter::SerializedSize(const T& data) {}

}  // namespace cc

#endif  // CC_PAINT_PAINT_OP_WRITER_H_