8#ifndef GrRecordingContext_DEFINED
9#define GrRecordingContext_DEFINED
117 return fRecordTimeSubRunAllocator;
142 std::unique_ptr<SkArenaAlloc> fRecordTimeAllocator;
143 std::unique_ptr<sktext::gpu::SubRunAllocator> fRecordTimeSubRunAllocator;
148 bool init()
override;
177 std::unique_ptr<const GrProgramDesc> fDesc;
215 void reset() { *
this = {}; }
217 int numPathMasksGenerated()
const {
return fNumPathMasksGenerated; }
220 int numPathMaskCacheHits()
const {
return fNumPathMaskCacheHits; }
223#if defined(GR_TEST_UTILS)
230 int fNumPathMasksGenerated{0};
231 int fNumPathMaskCacheHits{0};
237#if defined(GR_TEST_UTILS)
245#if GR_GPU_STATS && defined(GR_TEST_UTILS)
250 void merge(
const DMSAAStats&);
251 int fNumRenderPasses = 0;
252 int fNumMultisampleRenderPasses = 0;
253 std::map<std::string, int> fTriggerCounts;
256 DMSAAStats fDMSAAStats;
270 std::unique_ptr<GrDrawingManager> fDrawingManager;
271 std::unique_ptr<GrProxyProvider> fProxyProvider;
273#if defined(GR_TEST_UTILS)
274 int fSuppressWarningMessages = 0;
282 return base ?
base->asDirectContext() :
nullptr;
static GrDirectContext * GrAsDirectContext(GrContext_Base *base)
static void merge(const uint8_t *SK_RESTRICT row, int rowN, const SkAlpha *SK_RESTRICT srcAA, const int16_t *SK_RESTRICT srcRuns, SkAlpha *SK_RESTRICT dstAA, int16_t *SK_RESTRICT dstRuns, int width)
@ kR16G16B16A16_unorm_SkColorType
pixel with a little endian uint16_t for red, green, blue
@ kA16_unorm_SkColorType
pixel with a little endian uint16_t for alpha
@ kGray_8_SkColorType
pixel with grayscale level in 8-bit byte
@ kA16_float_SkColorType
pixel with a half float for alpha
@ kR16G16_unorm_SkColorType
pixel with a little endian uint16_t for red and green
@ kR16G16_float_SkColorType
pixel with a half float for red and green
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
static void dump(const float m[20], SkYUVColorSpace cs, bool rgb2yuv)
SK_API int maxSurfaceSampleCountForColorType(SkColorType colorType) const
virtual SK_API bool abandoned()
SkArenaAlloc * recordTimeAllocator()
sktext::gpu::SubRunAllocator * recordTimeSubRunAllocator()
Arenas(SkArenaAlloc *, sktext::gpu::SubRunAllocator *)
OwnedArenas & operator=(OwnedArenas &&)
OwnedArenas(bool ddlRecording)
void incNumPathMasksGenerated()
void incNumPathMasksCacheHits()
~GrRecordingContext() override
GrThreadSafeCache * threadSafeCache()
void dumpJSON(SkJSONWriter *) const
GrRecordingContextPriv priv()
virtual void detachProgramData(skia_private::TArray< ProgramData > *)
bool abandoned() override
SK_API bool colorTypeSupportedAsSurface(SkColorType colorType) const
GrRecordingContext * asRecordingContext() override
sktext::gpu::TextBlobRedrawCoordinator * getTextBlobRedrawCoordinator()
SK_API bool colorTypeSupportedAsImage(SkColorType) const
OwnedArenas && detachArenas()
class GrRecordingContext::Stats fStats
GrDrawingManager * drawingManager()
GrRecordingContext(sk_sp< GrContextThreadSafeProxy >, bool ddlRecording)
void addOnFlushCallbackObject(GrOnFlushCallbackObject *)
virtual void recordProgramInfo(const GrProgramInfo *)
const Stats * stats() const
SK_API sk_sp< const SkCapabilities > skCapabilities() const
GrProxyProvider * proxyProvider()
SK_API int maxSurfaceSampleCountForColorType(SkColorType colorType) const
SK_API int maxTextureSize() const
SK_API bool supportsProtectedContent() const
void destroyDrawingManager()
SK_API int maxRenderTargetSize() const
const GrProxyProvider * proxyProvider() const
std::unique_ptr< GrAuditTrail > fAuditTrail
void abandonContext() override
const GrProgramDesc & desc() const
ProgramData(std::unique_ptr< const GrProgramDesc >, const GrProgramInfo *)
const GrProgramInfo & info() const
ProgramData(const ProgramData &)=delete