44 : fDesc(
std::move(other.fDesc))
45 , fInfo(other.fInfo) {
53 , fArenas(ddlRecording) {
54 fProxyProvider = std::make_unique<GrProxyProvider>(
this);
68#if defined(GR_TEST_UTILS)
72 if (this->
options().fDisableDistanceFieldPaths) {
76 bool reduceOpsTaskSplitting =
true;
77 if (this->
caps()->avoidReorderingRenderTasks()) {
78 reduceOpsTaskSplitting =
false;
80 reduceOpsTaskSplitting =
true;
82 reduceOpsTaskSplitting =
false;
86 reduceOpsTaskSplitting));
97 return fDrawingManager.get();
101 fDrawingManager.reset();
106 : fRecordTimeAllocator(recordTimeAllocator)
107 , fRecordTimeSubRunAllocator(subRunAllocator) {
118 fDDLRecording =
a.fDDLRecording;
119 fRecordTimeAllocator = std::move(
a.fRecordTimeAllocator);
120 fRecordTimeSubRunAllocator = std::move(
a.fRecordTimeSubRunAllocator);
125 if (!fRecordTimeAllocator && fDDLRecording) {
127 fRecordTimeAllocator = std::make_unique<SkArenaAlloc>(1024);
130 if (!fRecordTimeSubRunAllocator) {
131 fRecordTimeSubRunAllocator = std::make_unique<sktext::gpu::SubRunAllocator>();
134 return {fRecordTimeAllocator.get(), fRecordTimeSubRunAllocator.get()};
138 return std::move(fArenas);
184#ifdef SK_ENABLE_DUMP_GPU
191 writer->
appendS32(
"path_masks_generated", this->
stats()->numPathMasksGenerated());
192 writer->
appendS32(
"path_mask_cache_hits", this->
stats()->numPathMaskCacheHits());
201#if defined(GR_TEST_UTILS)
206 out->appendf(
"Num Path Masks Generated: %d\n", fNumPathMasksGenerated);
207 out->appendf(
"Num Path Mask Cache Hits: %d\n", fNumPathMaskCacheHits);
213 values->push_back(fNumPathMasksGenerated);
216 values->push_back(fNumPathMaskCacheHits);
219void GrRecordingContext::DMSAAStats::dumpKeyValuePairs(
TArray<SkString>* keys,
222 values->push_back(fNumRenderPasses);
225 values->push_back(fNumMultisampleRenderPasses);
227 for (
const auto& [
name,
count] : fTriggerCounts) {
234 SkDebugf(
"DMSAA Render Passes: %d\n", fNumRenderPasses);
235 SkDebugf(
"DMSAA Multisample Render Passes: %d\n", fNumMultisampleRenderPasses);
236 if (!fTriggerCounts.empty()) {
238 for (
const auto& [
name,
count] : fTriggerCounts) {
245 fNumRenderPasses +=
stats.fNumRenderPasses;
246 fNumMultisampleRenderPasses +=
stats.fNumMultisampleRenderPasses;
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
sktext::gpu::TextBlobRedrawCoordinator TextBlobRedrawCoordinator
static constexpr GrColorType SkColorTypeToGrColorType(SkColorType ct)
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)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
SK_API SkString SkStringPrintf(const char *format,...) SK_PRINTF_LIKE(1
Creates a new string and writes into it using a printf()-style format.
static void dump(const float m[20], SkYUVColorSpace cs, bool rgb2yuv)
bool supportsProtectedContent() const
int maxTextureSize() const
int maxRenderTargetSize() const
GrBackendFormat getDefaultBackendFormat(GrColorType, GrRenderable) const
sktext::gpu::TextBlobRedrawCoordinator * getTextBlobRedrawCoordinator()
GrThreadSafeCache * threadSafeCache()
GrContextThreadSafeProxyPriv priv()
const GrCaps * caps() const
sk_sp< const GrCaps > refCaps() const
sk_sp< GrContextThreadSafeProxy > fThreadSafeProxy
const GrContextOptions & options() const
void addOnFlushCallbackObject(GrOnFlushCallbackObject *)
virtual SK_API void abandonContext()
Arenas(SkArenaAlloc *, sktext::gpu::SubRunAllocator *)
OwnedArenas & operator=(OwnedArenas &&)
OwnedArenas(bool ddlRecording)
~GrRecordingContext() override
GrThreadSafeCache * threadSafeCache()
void dumpJSON(SkJSONWriter *) const
sktext::gpu::TextBlobRedrawCoordinator * getTextBlobRedrawCoordinator()
SK_API bool colorTypeSupportedAsImage(SkColorType) const
OwnedArenas && detachArenas()
GrDrawingManager * drawingManager()
GrRecordingContext(sk_sp< GrContextThreadSafeProxy >, bool ddlRecording)
void addOnFlushCallbackObject(GrOnFlushCallbackObject *)
SK_API sk_sp< const SkCapabilities > skCapabilities() const
SK_API int maxTextureSize() const
SK_API bool supportsProtectedContent() const
void destroyDrawingManager()
SK_API int maxRenderTargetSize() const
std::unique_ptr< GrAuditTrail > fAuditTrail
void abandonContext() override
void appendS32(int32_t value)
void beginObject(const char *name=nullptr, bool multiline=true)
uint32_t uint32_t * format
DEF_SWITCHES_START aot vmservice shared library name
bool fAllowPathMaskCaching
ProgramData(std::unique_ptr< const GrProgramDesc >, const GrProgramInfo *)
bool fAllowPathMaskCaching
GpuPathRenderers fGpuPathRenderers