From 216b1572b46ecb1225c8b1a904d7f98e2e6c4b01 Mon Sep 17 00:00:00 2001 From: Stan Iliev Date: Mon, 26 Mar 2018 14:29:50 -0400 Subject: Better error reporting for createOrUpdateLayer Pass error handler down to the pipeline object, which allows skia pipelines to print cache memory usage. In case of an error, print arguments that were used to invoke SkSurface::MakeRenderTarget. Test: Ran android build on a device Bug: 76115654 Change-Id: I5baddfa66debd505eddc3117cf94aa6ae69bedaa --- libs/hwui/RenderNode.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'libs/hwui/RenderNode.cpp') diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp index fedcc10abb64..d93a7578cfd7 100644 --- a/libs/hwui/RenderNode.cpp +++ b/libs/hwui/RenderNode.cpp @@ -243,24 +243,11 @@ void RenderNode::pushLayerUpdate(TreeInfo& info) { return; } - if (info.canvasContext.createOrUpdateLayer(this, *info.damageAccumulator)) { + if (info.canvasContext.createOrUpdateLayer(this, *info.damageAccumulator, info.errorHandler)) { damageSelf(info); } if (!hasLayer()) { - Caches::getInstance().dumpMemoryUsage(); - if (info.errorHandler) { - std::ostringstream err; - err << "Unable to create layer for " << getName(); - const int maxTextureSize = Caches::getInstance().maxTextureSize; - if (getWidth() > maxTextureSize || getHeight() > maxTextureSize) { - err << ", size " << getWidth() << "x" << getHeight() << " exceeds max size " - << maxTextureSize; - } else { - err << ", see logcat for more info"; - } - info.errorHandler->onError(err.str()); - } return; } -- cgit v1.2.3-59-g8ed1b