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

/*
 * Copyright 2021 Google LLC
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef SkMeshPriv_DEFINED
#define SkMeshPriv_DEFINED

#include "include/core/SkData.h"
#include "include/core/SkMesh.h"
#include "src/core/SkSLTypeShared.h"

struct SkMeshSpecificationPriv {};

namespace SkMeshPriv {
class Buffer {};

class IB : public Buffer, public SkMesh::IndexBuffer  {};
class VB : public Buffer, public SkMesh::VertexBuffer {};

template <typename Base> class CpuBuffer final : public Base {};

CpuIndexBuffer;
CpuVertexBuffer;
}  // namespace SkMeshPriv

inline SkMeshPriv::Buffer::~Buffer() = default;

template <typename Base> sk_sp<Base> SkMeshPriv::CpuBuffer<Base>::Make(const void* data,
                                                                       size_t size) {}

template <typename Base> bool SkMeshPriv::CpuBuffer<Base>::onUpdate(GrDirectContext* dc,
                                                                    const void* data,
                                                                    size_t offset,
                                                                    size_t size) {}

#endif