#ifndef SkGr_DEFINED
#define SkGr_DEFINED
#include "include/core/SkBlendMode.h"
#include "include/core/SkColor.h"
#include "include/core/SkColorPriv.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkSamplingOptions.h"
#include "include/core/SkTileMode.h"
#include "include/core/SkTypes.h"
#include "include/gpu/GpuTypes.h"
#include "include/private/SkColorData.h"
#include "src/gpu/Blend.h"
#include "src/gpu/SkBackingFit.h"
#include "src/gpu/ganesh/GrColor.h"
#include "src/gpu/ganesh/GrSamplerState.h"
#include <cstdint>
#include <memory>
#include <string_view>
#include <tuple>
class GrColorInfo;
class GrFragmentProcessor;
class GrPaint;
class GrRecordingContext;
class GrSurfaceProxy;
class GrSurfaceProxyView;
class SkBitmap;
class SkBlender;
class SkIDChangeListener;
class SkMatrix;
class SkPaint;
class SkSurfaceProps;
enum class GrColorType;
enum GrSurfaceOrigin : int;
struct SkIRect;
namespace skgpu { class UniqueKey; }
static inline GrColor SkColorToPremulGrColor(SkColor c) { … }
static inline GrColor SkColorToUnpremulGrColor(SkColor c) { … }
SkPMColor4f SkColorToPMColor4f(SkColor, const GrColorInfo&);
SkColor4f SkColor4fPrepForDst(SkColor4f, const GrColorInfo&);
static constexpr GrSamplerState::WrapMode SkTileModeToWrapMode(SkTileMode tileMode) { … }
bool SkPaintToGrPaint(GrRecordingContext*,
const GrColorInfo& dstColorInfo,
const SkPaint& skPaint,
const SkMatrix& ctm,
const SkSurfaceProps& surfaceProps,
GrPaint* grPaint);
bool SkPaintToGrPaintReplaceShader(GrRecordingContext*,
const GrColorInfo& dstColorInfo,
const SkPaint& skPaint,
const SkMatrix& ctm,
std::unique_ptr<GrFragmentProcessor> shaderFP,
const SkSurfaceProps& surfaceProps,
GrPaint* grPaint);
bool SkPaintToGrPaintWithBlend(GrRecordingContext* context,
const GrColorInfo& dstColorInfo,
const SkPaint& skPaint,
const SkMatrix& ctm,
SkBlender* primColorBlender,
const SkSurfaceProps& surfaceProps,
GrPaint* grPaint);
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
enum class GrImageTexGenPolicy : int { … };
sk_sp<GrSurfaceProxy> GrCopyBaseMipMapToTextureProxy(GrRecordingContext*,
sk_sp<GrSurfaceProxy> baseProxy,
GrSurfaceOrigin origin,
std::string_view label,
skgpu::Budgeted = skgpu::Budgeted::kYes);
GrSurfaceProxyView GrCopyBaseMipMapToView(GrRecordingContext*,
GrSurfaceProxyView,
skgpu::Budgeted = skgpu::Budgeted::kYes);
std::tuple<GrSurfaceProxyView, GrColorType> GrMakeCachedBitmapProxyView(
GrRecordingContext*,
const SkBitmap&,
std::string_view label,
skgpu::Mipmapped = skgpu::Mipmapped::kNo);
std::tuple<GrSurfaceProxyView, GrColorType> GrMakeUncachedBitmapProxyView(
GrRecordingContext*,
const SkBitmap&,
skgpu::Mipmapped = skgpu::Mipmapped::kNo,
SkBackingFit = SkBackingFit::kExact,
skgpu::Budgeted = skgpu::Budgeted::kYes);
void GrMakeKeyFromImageID(skgpu::UniqueKey* key, uint32_t imageID, const SkIRect& imageBounds);
sk_sp<SkIDChangeListener> GrMakeUniqueKeyInvalidationListener(skgpu::UniqueKey*,
uint32_t contextID);
static inline bool GrValidCubicResampler(SkCubicResampler cubic) { … }
#endif