34 std::move(colorSpace),
67#if !defined(SK_DISABLE_SDF_TEXT)
91 std::unique_ptr<skgpu::ganesh::SurfaceContext> sc;
103 sc = std::make_unique<skgpu::ganesh::SurfaceDrawContext>(this->
context(),
105 std::move(writeView),
107 info.refColorSpace(),
110 sc = std::make_unique<skgpu::ganesh::SurfaceFillContext>(
111 this->
context(), std::move(readView), std::move(writeView),
info);
114 sc = std::make_unique<skgpu::ganesh::SurfaceContext>(
124 std::string_view label,
152 !this->caps()->isFormatCompressed(
format)) {
157 return this->
makeSC(std::move(view),
info.colorInfo());
162 std::string_view label,
172 info.refColorSpace(),
203 std::unique_ptr<skgpu::ganesh::SurfaceFillContext> sfc;
204 sfc = std::make_unique<skgpu::ganesh::SurfaceFillContext>(
205 this->
context(), std::move(readView), std::move(writeView),
info.colorInfo());
223 std::string_view label) {
229 std::move(colorSpace),
260 std::unique_ptr<skgpu::ganesh::SurfaceFillContext> sfc;
261 sfc = std::make_unique<skgpu::ganesh::SurfaceFillContext>(
262 this->
context(), std::move(readView), std::move(writeView),
info.colorInfo());
278 info.refColorSpace(),
295 return this->
makeSFC(info,
"MakeSurfaceContextWithFallback",
304std::unique_ptr<skgpu::ganesh::SurfaceFillContext>
315 info.refColorSpace(),
320 std::move(releaseHelper));
328 if (!this->
caps()->areColorTypeAndFormatCompatible(
info.colorType(),
format)) {
336 std::move(releaseHelper)));
344 return std::make_unique<skgpu::ganesh::SurfaceFillContext>(
345 this->
context(), std::move(readView), std::move(writeView), std::move(
info));
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
@ kBorrow_GrWrapOwnership
@ kOpaque_SkAlphaType
pixel is opaque
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
GrBackendFormat getBackendFormat() const
const GrContextOptions & options() const
GrContext_Base * fContext
const GrCaps * caps() const
std::tuple< GrColorType, GrBackendFormat > getFallbackColorTypeAndFormat(GrColorType, int sampleCount) const
bool disablePerspectiveSDFText() const
const GrShaderCaps * shaderCaps() const
virtual skgpu::Swizzle getWriteSwizzle(const GrBackendFormat &, GrColorType) const =0
GrBackendFormat getDefaultBackendFormat(GrColorType, GrRenderable) const
skgpu::Swizzle getReadSwizzle(const GrBackendFormat &format, GrColorType colorType) const
GrColorType colorType() const
SK_API GrBackendApi backend() const
void moveRenderTasksToDDL(GrDeferredDisplayList *ddl)
SkDEBUGCODE(skgpu::SingleOwner *singleOwner() const { return this->context() ->singleOwner();}) protected
GrColorType colorType() const
sk_sp< GrTextureProxy > createProxy(const GrBackendFormat &, SkISize dimensions, GrRenderable, int renderTargetSampleCnt, skgpu::Mipmapped, SkBackingFit, skgpu::Budgeted, GrProtected, std::string_view label, GrInternalSurfaceFlags=GrInternalSurfaceFlags::kNone, UseAllocator useAllocator=UseAllocator::kYes)
void addOnFlushCallbackObject(GrOnFlushCallbackObject *)
GrProxyProvider * proxyProvider()
sktext::gpu::SDFTControl getSDFTControl(bool useSDFTForSmallText) const
std::unique_ptr< skgpu::ganesh::SurfaceFillContext > makeSFCFromBackendTexture(GrColorInfo, const GrBackendTexture &, int sampleCount, GrSurfaceOrigin, sk_sp< skgpu::RefCntedCallback > releaseHelper)
std::unique_ptr< skgpu::ganesh::SurfaceFillContext > makeSFCWithFallback(GrImageInfo, SkBackingFit, int sampleCount, skgpu::Mipmapped, skgpu::Protected, GrSurfaceOrigin=kTopLeft_GrSurfaceOrigin, skgpu::Budgeted=skgpu::Budgeted::kYes)
void moveRenderTasksToDDL(GrDeferredDisplayList *)
std::unique_ptr< skgpu::ganesh::SurfaceContext > makeSC(GrSurfaceProxyView readView, const GrColorInfo &)
GrRecordingContext * context()
std::unique_ptr< skgpu::ganesh::SurfaceFillContext > makeSFC(GrImageInfo, std::string_view label, SkBackingFit=SkBackingFit::kExact, int sampleCount=1, skgpu::Mipmapped=skgpu::Mipmapped::kNo, skgpu::Protected=skgpu::Protected::kNo, GrSurfaceOrigin=kTopLeft_GrSurfaceOrigin, skgpu::Budgeted=skgpu::Budgeted::kYes)
sk_sp< skgpu::ganesh::Device > createDevice(GrColorType, sk_sp< GrSurfaceProxy >, sk_sp< SkColorSpace >, GrSurfaceOrigin, const SkSurfaceProps &, skgpu::ganesh::Device::InitContents)
GrDrawingManager * drawingManager()
void addOnFlushCallbackObject(GrOnFlushCallbackObject *)
GrSurfaceOrigin origin() const
GrSurfaceProxy * proxy() const
sk_sp< GrSurfaceProxy > refProxy() const
virtual GrRenderTargetProxy * asRenderTargetProxy()
const GrBackendFormat & backendFormat() const
virtual GrTextureProxy * asTextureProxy()
static sk_sp< Device > Make(GrRecordingContext *, GrColorType, sk_sp< GrSurfaceProxy >, sk_sp< SkColorSpace >, GrSurfaceOrigin, const SkSurfaceProps &, InitContents)
static std::unique_ptr< SurfaceDrawContext > MakeFromBackendTexture(GrRecordingContext *, GrColorType, sk_sp< SkColorSpace >, const GrBackendTexture &, int sampleCnt, GrSurfaceOrigin, const SkSurfaceProps &, sk_sp< skgpu::RefCntedCallback > releaseHelper)
static std::unique_ptr< SurfaceDrawContext > Make(GrRecordingContext *, GrColorType, sk_sp< GrSurfaceProxy >, sk_sp< SkColorSpace >, GrSurfaceOrigin, const SkSurfaceProps &)
static std::unique_ptr< SurfaceDrawContext > MakeWithFallback(GrRecordingContext *, GrColorType, sk_sp< SkColorSpace >, SkBackingFit, SkISize dimensions, const SkSurfaceProps &, int sampleCnt, skgpu::Mipmapped, skgpu::Protected, GrSurfaceOrigin=kBottomLeft_GrSurfaceOrigin, skgpu::Budgeted=skgpu::Budgeted::kYes)
uint32_t uint32_t * format
float fGlyphsAsPathsFontSize
float fMinDistanceFieldFontSize
bool supportsDistanceFieldText() const