11#if defined(GR_TEST_UTILS)
18static const char* cache_result_to_str(
int i) {
19 const char* kCacheResultStrings[Stats::kNumProgramCacheResults] = {
24 static_assert(0 == (
int) Stats::ProgramCacheResult::kHit);
25 static_assert(1 == (
int) Stats::ProgramCacheResult::kMiss);
26 static_assert(2 == (
int) Stats::ProgramCacheResult::kPartial);
27 static_assert(Stats::kNumProgramCacheResults == 3);
28 return kCacheResultStrings[
i];
32 out->appendf(
"Shader Compilations: %d\n", fShaderCompilations.load());
34 SkASSERT(fNumInlineCompilationFailures == 0);
35 out->appendf(
"Number of Inline compile failures %d\n", fNumInlineCompilationFailures.load());
36 for (
int i = 0;
i < Stats::kNumProgramCacheResults-1; ++
i) {
37 out->appendf(
"Inline Program Cache %s %d\n", cache_result_to_str(
i),
38 fInlineProgramCacheStats[
i].
load());
41 SkASSERT(fNumPreCompilationFailures == 0);
42 out->appendf(
"Number of precompile failures %d\n", fNumPreCompilationFailures.load());
43 for (
int i = 0;
i < Stats::kNumProgramCacheResults-1; ++
i) {
44 out->appendf(
"Precompile Program Cache %s %d\n", cache_result_to_str(
i),
45 fPreProgramCacheStats[
i].
load());
48 SkASSERT(fNumCompilationFailures == 0);
49 out->appendf(
"Total number of compilation failures %d\n", fNumCompilationFailures.load());
50 out->appendf(
"Total number of partial compilation successes %d\n",
51 fNumPartialCompilationSuccesses.load());
52 out->appendf(
"Total number of compilation successes %d\n", fNumCompilationSuccesses.load());
55void GrThreadSafePipelineBuilder::Stats::dumpKeyValuePairs(
TArray<SkString>* keys,
static void dump(const float m[20], SkYUVColorSpace cs, bool rgb2yuv)