#include "src/utils/SkPatchUtils.h"
#include "include/core/SkAlphaType.h"
#include "include/core/SkColorSpace.h"
#include "include/core/SkColorType.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkMatrix.h"
#include "include/core/SkPoint.h"
#include "include/core/SkScalar.h"
#include "include/core/SkSize.h"
#include "include/core/SkTypes.h"
#include "include/core/SkVertices.h"
#include "include/private/SkColorData.h"
#include "include/private/base/SkFloatingPoint.h"
#include "include/private/base/SkMath.h"
#include "include/private/base/SkTPin.h"
#include "include/private/base/SkTo.h"
#include "src/base/SkArenaAlloc.h"
#include "src/base/SkVx.h"
#include "src/core/SkColorSpacePriv.h"
#include "src/core/SkConvertPixels.h"
#include "src/core/SkGeometry.h"
#include <algorithm>
#include <cstdint>
#include <cstring>
namespace {
enum CubicCtrlPts { … };
enum Corner { … };
}
class FwDCubicEvaluator { … };
static const int kPartitionSize = …;
static SkScalar approx_arc_length(const SkPoint points[], int count) { … }
static SkScalar bilerp(SkScalar tx, SkScalar ty, SkScalar c00, SkScalar c10, SkScalar c01,
SkScalar c11) { … }
static skvx::float4 bilerp(SkScalar tx, SkScalar ty,
const skvx::float4& c00,
const skvx::float4& c10,
const skvx::float4& c01,
const skvx::float4& c11) { … }
SkISize SkPatchUtils::GetLevelOfDetail(const SkPoint cubics[12], const SkMatrix* matrix) { … }
void SkPatchUtils::GetTopCubic(const SkPoint cubics[12], SkPoint points[4]) { … }
void SkPatchUtils::GetBottomCubic(const SkPoint cubics[12], SkPoint points[4]) { … }
void SkPatchUtils::GetLeftCubic(const SkPoint cubics[12], SkPoint points[4]) { … }
void SkPatchUtils::GetRightCubic(const SkPoint cubics[12], SkPoint points[4]) { … }
static void skcolor_to_float(SkPMColor4f* dst, const SkColor* src, int count, SkColorSpace* dstCS) { … }
static void float_to_skcolor(SkColor* dst, const SkPMColor4f* src, int count, SkColorSpace* srcCS) { … }
sk_sp<SkVertices> SkPatchUtils::MakeVertices(const SkPoint cubics[12], const SkColor srcColors[4],
const SkPoint srcTexCoords[4], int lodX, int lodY,
SkColorSpace* colorSpace) { … }