From 668f0e38ef0277d55d3118af37e17b8c435df85c Mon Sep 17 00:00:00 2001 From: John Reck Date: Wed, 26 Mar 2014 15:10:40 -0700 Subject: Async drawing! Change-Id: I7e728356f58af88174328a8c0b90d27b128bfe01 --- libs/hwui/RenderNode.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'libs/hwui/RenderNode.cpp') diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp index d3daec8e7dd3..f0cf42f2f634 100644 --- a/libs/hwui/RenderNode.cpp +++ b/libs/hwui/RenderNode.cpp @@ -107,6 +107,23 @@ void RenderNode::updateProperties() { } } +bool RenderNode::hasFunctors() { + if (!mDisplayListData) return false; + + if (mDisplayListData->functorCount) { + return true; + } + + for (size_t i = 0; i < mDisplayListData->children.size(); i++) { + RenderNode* childNode = mDisplayListData->children[i]->mDisplayList; + if (childNode->hasFunctors()) { + return true; + } + } + + return false; +} + /* * For property operations, we pass a savecount of 0, since the operations aren't part of the * displaylist, and thus don't have to compensate for the record-time/playback-time discrepancy in -- cgit v1.2.3-59-g8ed1b