From b5a5435a77bae40b55053ccde93b1ed45d0e8329 Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Fri, 21 Nov 2014 14:54:35 -0800 Subject: Improve DisplayList state output bug:17991451 Log hardware layers and shadow casting Change-Id: I2ae40f270d18f5b2a5af985513e0f5e8841216c2 --- libs/hwui/RenderNode.cpp | 7 +++++-- libs/hwui/RenderProperties.h | 2 +- libs/hwui/tests/Android.mk | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'libs/hwui') diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp index 13c5499..5d5f152 100644 --- a/libs/hwui/RenderNode.cpp +++ b/libs/hwui/RenderNode.cpp @@ -105,8 +105,11 @@ void RenderNode::setStagingDisplayList(DisplayListData* data) { * display list. This function should remain in sync with the replay() function. */ void RenderNode::output(uint32_t level) { - ALOGD("%*sStart display list (%p, %s, render=%d)", (level - 1) * 2, "", this, - getName(), isRenderable()); + ALOGD("%*sStart display list (%p, %s%s%s%s)", (level - 1) * 2, "", this, + getName(), + (properties().hasShadow() ? ", casting shadow" : ""), + (isRenderable() ? "" : ", empty"), + (mLayer != NULL ? ", on HW Layer" : "")); ALOGD("%*s%s %d", level * 2, "", "Save", SkCanvas::kMatrix_SaveFlag | SkCanvas::kClip_SaveFlag); diff --git a/libs/hwui/RenderProperties.h b/libs/hwui/RenderProperties.h index b936d4b..31c4f22 100644 --- a/libs/hwui/RenderProperties.h +++ b/libs/hwui/RenderProperties.h @@ -570,7 +570,7 @@ public: } bool hasShadow() const { - return getZ() >= 0.0f + return getZ() > 0.0f && getOutline().getPath() != NULL && getOutline().getAlpha() != 0.0f; } diff --git a/libs/hwui/tests/Android.mk b/libs/hwui/tests/Android.mk index 9622073..7bdce7f 100644 --- a/libs/hwui/tests/Android.mk +++ b/libs/hwui/tests/Android.mk @@ -19,6 +19,7 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_CFLAGS += -DUSE_OPENGL_RENDERER -DEGL_EGLEXT_PROTOTYPES -DGL_GLEXT_PROTOTYPES +LOCAL_CFLAGS += -Wno-unused-parameter LOCAL_CFLAGS += -DATRACE_TAG=ATRACE_TAG_VIEW -DLOG_TAG=\"OpenGLRenderer\" LOCAL_SRC_FILES:= \ -- cgit v1.1