chromium/third_party/skia/src/gpu/ganesh/geometry/GrInnerFanTriangulator.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 GrInnerFanTriangulator_DEFINED
#define GrInnerFanTriangulator_DEFINED

#include "include/core/SkRect.h"
#include "src/gpu/ganesh/geometry/GrTriangulator.h"

#include <utility>

class GrEagerVertexAllocator;
class SkArenaAlloc;
class SkPath;

#if !defined(SK_ENABLE_OPTIMIZE_SIZE)

// Triangulates the inner polygon(s) of a path (i.e., the triangle fan for a Redbook rendering
// method). When combined with the outer curves and breadcrumb triangles, these produce a complete
// path. If a breadcrumbCollector is not provided, pathToPolys fails upon self intersection.
class GrInnerFanTriangulator : private GrTriangulator {};

#else

// Stub out GrInnerFanTriangulator::BreadcrumbTriangleList for function declarations.
namespace GrInnerFanTriangulator {
    struct BreadcrumbTriangleList {
        BreadcrumbTriangleList() = delete;
    };
};

#endif // SK_ENABLE_OPTIMIZE_SIZE

#endif // GrInnerFanTriangulator_DEFINED