#include "src/gpu/graphite/Image_Base_Graphite.h"
#include "include/core/SkColorSpace.h"
#include "include/gpu/graphite/Image.h"
#include "include/gpu/graphite/Recorder.h"
#include "include/gpu/graphite/Surface.h"
#include "src/gpu/graphite/Device.h"
#include "src/gpu/graphite/DrawContext.h"
#include "src/gpu/graphite/Image_Graphite.h"
#include "src/gpu/graphite/Image_YUVA_Graphite.h"
#include "src/gpu/graphite/Log.h"
#include "src/gpu/graphite/RecorderPriv.h"
#include "src/gpu/graphite/Surface_Graphite.h"
#include "src/gpu/graphite/TextureUtils.h"
namespace skgpu::graphite {
Image_Base::Image_Base(const SkImageInfo& info, uint32_t uniqueID)
: … { … }
Image_Base::~Image_Base() = default;
void Image_Base::linkDevices(const Image_Base* other) { … }
void Image_Base::linkDevice(sk_sp<Device> device) { … }
void Image_Base::notifyInUse(Recorder* recorder, DrawContext* drawContext) const { … }
bool Image_Base::isDynamic() const { … }
sk_sp<Image> Image_Base::copyImage(Recorder* recorder,
const SkIRect& subset,
Budgeted budgeted,
Mipmapped mipmapped,
SkBackingFit backingFit,
std::string_view label) const { … }
namespace {
TextureProxy* get_base_proxy_for_label(const Image_Base* baseImage) { … }
}
sk_sp<SkImage> Image_Base::onMakeSubset(Recorder* recorder,
const SkIRect& subset,
RequiredProperties requiredProps) const { … }
sk_sp<SkSurface> Image_Base::onMakeSurface(Recorder* recorder, const SkImageInfo& info) const { … }
sk_sp<SkImage> Image_Base::makeColorTypeAndColorSpace(Recorder* recorder,
SkColorType targetCT,
sk_sp<SkColorSpace> targetCS,
RequiredProperties requiredProps) const { … }
sk_sp<SkImage> Image_Base::onMakeSubset(GrDirectContext*, const SkIRect&) const { … }
sk_sp<SkImage> Image_Base::onMakeColorTypeAndColorSpace(SkColorType,
sk_sp<SkColorSpace>,
GrDirectContext*) const { … }
void Image_Base::onAsyncRescaleAndReadPixels(const SkImageInfo& info,
SkIRect srcRect,
RescaleGamma rescaleGamma,
RescaleMode rescaleMode,
ReadPixelsCallback callback,
ReadPixelsContext context) const { … }
void Image_Base::onAsyncRescaleAndReadPixelsYUV420(SkYUVColorSpace yuvColorSpace,
bool readAlpha,
sk_sp<SkColorSpace> dstColorSpace,
const SkIRect srcRect,
const SkISize dstSize,
RescaleGamma rescaleGamma,
RescaleMode rescaleMode,
ReadPixelsCallback callback,
ReadPixelsContext context) const { … }
}