Improve logging around performance critical events
bug:17702227
Add details useful to developers (such as layer size/View name), and
switch away from logging implementation names/details, since they
are generally not relevant to developers.
Change-Id: Iee605d182f241450f7e75a6d0c283d51fa1312f5
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp
index 13c5499..eb0948f 100644
--- a/libs/hwui/RenderNode.cpp
+++ b/libs/hwui/RenderNode.cpp
@@ -25,7 +25,6 @@
#include <SkCanvas.h>
#include <algorithm>
-#include <utils/Trace.h>
#include "DamageAccumulator.h"
#include "Debug.h"
@@ -34,6 +33,7 @@
#include "LayerRenderer.h"
#include "OpenGLRenderer.h"
#include "utils/MathUtils.h"
+#include "utils/TraceUtils.h"
#include "renderthread/CanvasContext.h"
namespace android {
@@ -426,6 +426,10 @@
clipFlags = 0; // all clipping done by saveLayer
}
+ ATRACE_FORMAT("%s alpha caused %ssaveLayer %ux%u",
+ getName(), clipFlags ? "" : "unclipped ",
+ layerBounds.getWidth(), layerBounds.getHeight());
+
SaveLayerOp* op = new (handler.allocator()) SaveLayerOp(
layerBounds.left, layerBounds.top, layerBounds.right, layerBounds.bottom,
properties().getAlpha() * 255, saveFlags);