Loading libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,11 @@ bool SkiaOpenGLPipeline::draw(const Frame& frame, const SkRect& screenDirty, profileCanvas->flush(); } // Log memory statistics if (CC_UNLIKELY(Properties::debugLevel != kDebugDisabled)) { dumpResourceCacheUsage(); } return true; } Loading libs/hwui/pipeline/skia/SkiaPipeline.cpp +14 −0 Original line number Diff line number Diff line Loading @@ -266,6 +266,20 @@ void SkiaPipeline::renderFrame(const LayerUpdateQueue& layers, const SkRect& cli canvas->flush(); } void SkiaPipeline::dumpResourceCacheUsage() const { int resources, maxResources; size_t bytes, maxBytes; mRenderThread.getGrContext()->getResourceCacheUsage(&resources, &bytes); mRenderThread.getGrContext()->getResourceCacheLimits(&maxResources, &maxBytes); SkString log("Resource Cache Usage:\n"); log.appendf("%8d items out of %d maximum items\n", resources, maxResources); log.appendf("%8zu bytes (%.2f MB) out of %.2f MB maximum\n", bytes, bytes * (1.0f / (1024.0f * 1024.0f)), maxBytes * (1.0f / (1024.0f * 1024.0f))); ALOGD("%s", log.c_str()); } } /* namespace skiapipeline */ } /* namespace uirenderer */ } /* namespace android */ libs/hwui/pipeline/skia/SkiaPipeline.h +3 −0 Original line number Diff line number Diff line Loading @@ -100,7 +100,10 @@ public: mSpotShadowAlpha = lightInfo.spotShadowAlpha; mLightCenter = lightGeometry.center; } protected: void dumpResourceCacheUsage() const; renderthread::RenderThread& mRenderThread; private: Loading libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,11 @@ bool SkiaVulkanPipeline::draw(const Frame& frame, const SkRect& screenDirty, profileCanvas->flush(); } // Log memory statistics if (CC_UNLIKELY(Properties::debugLevel != kDebugDisabled)) { dumpResourceCacheUsage(); } return true; } Loading Loading
libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,11 @@ bool SkiaOpenGLPipeline::draw(const Frame& frame, const SkRect& screenDirty, profileCanvas->flush(); } // Log memory statistics if (CC_UNLIKELY(Properties::debugLevel != kDebugDisabled)) { dumpResourceCacheUsage(); } return true; } Loading
libs/hwui/pipeline/skia/SkiaPipeline.cpp +14 −0 Original line number Diff line number Diff line Loading @@ -266,6 +266,20 @@ void SkiaPipeline::renderFrame(const LayerUpdateQueue& layers, const SkRect& cli canvas->flush(); } void SkiaPipeline::dumpResourceCacheUsage() const { int resources, maxResources; size_t bytes, maxBytes; mRenderThread.getGrContext()->getResourceCacheUsage(&resources, &bytes); mRenderThread.getGrContext()->getResourceCacheLimits(&maxResources, &maxBytes); SkString log("Resource Cache Usage:\n"); log.appendf("%8d items out of %d maximum items\n", resources, maxResources); log.appendf("%8zu bytes (%.2f MB) out of %.2f MB maximum\n", bytes, bytes * (1.0f / (1024.0f * 1024.0f)), maxBytes * (1.0f / (1024.0f * 1024.0f))); ALOGD("%s", log.c_str()); } } /* namespace skiapipeline */ } /* namespace uirenderer */ } /* namespace android */
libs/hwui/pipeline/skia/SkiaPipeline.h +3 −0 Original line number Diff line number Diff line Loading @@ -100,7 +100,10 @@ public: mSpotShadowAlpha = lightInfo.spotShadowAlpha; mLightCenter = lightGeometry.center; } protected: void dumpResourceCacheUsage() const; renderthread::RenderThread& mRenderThread; private: Loading
libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,11 @@ bool SkiaVulkanPipeline::draw(const Frame& frame, const SkRect& screenDirty, profileCanvas->flush(); } // Log memory statistics if (CC_UNLIKELY(Properties::debugLevel != kDebugDisabled)) { dumpResourceCacheUsage(); } return true; } Loading