SkiaGLRE caching: monitor the caching of shaders
Bug: 178661709
Test: adb shell setprop debug.renderengine.backend skiagl
adb shell stop && adb shell start
adb shell dumpsys SurfaceFlinger
Add an implementation of PersistentCache that allows us to monitor
whether a shader was generated when we expected one to be. This can be
repurposed in the future (i.e. once we've generated all the shaders we
expect) to verify that we do *not* generate shaders after primeCache
finishes.
Add the number of recently cached shaders (i.e. since the last call, or
primeCache, if this is the first call) to the output of dumpsys.
Change-Id: I6f177b7ad78fef166d529e918447395629673f47
diff --git a/libs/renderengine/skia/SkiaRenderEngine.h b/libs/renderengine/skia/SkiaRenderEngine.h
index f403725..59d7e2f 100644
--- a/libs/renderengine/skia/SkiaRenderEngine.h
+++ b/libs/renderengine/skia/SkiaRenderEngine.h
@@ -58,6 +58,7 @@
};
virtual bool cleanupPostRender(CleanupMode) override { return true; };
virtual int getContextPriority() override { return 0; }
+ virtual void assertShadersCompiled(int numShaders) {}
};
} // namespace skia