Loading libs/hwui/RenderNode.cpp +9 −3 Original line number Diff line number Diff line Loading @@ -404,13 +404,19 @@ void RenderNode::syncDisplayList(TreeObserver& observer, TreeInfo* info) { } } inline bool RenderNode::isForceInvertDark(TreeInfo& info) { return CC_UNLIKELY( info.forceDarkType == android::uirenderer::ForceDarkType::FORCE_INVERT_COLOR_DARK); } inline bool RenderNode::shouldEnableForceDark(TreeInfo* info) { return CC_UNLIKELY( info && (!info->disableForceDark || info->forceDarkType == android::uirenderer::ForceDarkType::FORCE_INVERT_COLOR_DARK)); (!info->disableForceDark || isForceInvertDark(*info))); } void RenderNode::handleForceDark(android::uirenderer::TreeInfo *info) { if (!shouldEnableForceDark(info)) { return; Loading @@ -421,7 +427,7 @@ void RenderNode::handleForceDark(android::uirenderer::TreeInfo *info) { children.push_back(node); }); if (mDisplayList.hasText()) { if (mDisplayList.hasFill()) { if (isForceInvertDark(*info) && mDisplayList.hasFill()) { // Handle a special case for custom views that draw both text and background in the // same RenderNode, which would otherwise be altered to white-on-white text. usage = UsageHint::Container; Loading libs/hwui/RenderNode.h +1 −0 Original line number Diff line number Diff line Loading @@ -234,6 +234,7 @@ private: void syncDisplayList(TreeObserver& observer, TreeInfo* info); void handleForceDark(TreeInfo* info); bool shouldEnableForceDark(TreeInfo* info); bool isForceInvertDark(TreeInfo& info); void prepareTreeImpl(TreeObserver& observer, TreeInfo& info, bool functorsNeedLayer); void pushStagingPropertiesChanges(TreeInfo& info); Loading Loading
libs/hwui/RenderNode.cpp +9 −3 Original line number Diff line number Diff line Loading @@ -404,13 +404,19 @@ void RenderNode::syncDisplayList(TreeObserver& observer, TreeInfo* info) { } } inline bool RenderNode::isForceInvertDark(TreeInfo& info) { return CC_UNLIKELY( info.forceDarkType == android::uirenderer::ForceDarkType::FORCE_INVERT_COLOR_DARK); } inline bool RenderNode::shouldEnableForceDark(TreeInfo* info) { return CC_UNLIKELY( info && (!info->disableForceDark || info->forceDarkType == android::uirenderer::ForceDarkType::FORCE_INVERT_COLOR_DARK)); (!info->disableForceDark || isForceInvertDark(*info))); } void RenderNode::handleForceDark(android::uirenderer::TreeInfo *info) { if (!shouldEnableForceDark(info)) { return; Loading @@ -421,7 +427,7 @@ void RenderNode::handleForceDark(android::uirenderer::TreeInfo *info) { children.push_back(node); }); if (mDisplayList.hasText()) { if (mDisplayList.hasFill()) { if (isForceInvertDark(*info) && mDisplayList.hasFill()) { // Handle a special case for custom views that draw both text and background in the // same RenderNode, which would otherwise be altered to white-on-white text. usage = UsageHint::Container; Loading
libs/hwui/RenderNode.h +1 −0 Original line number Diff line number Diff line Loading @@ -234,6 +234,7 @@ private: void syncDisplayList(TreeObserver& observer, TreeInfo* info); void handleForceDark(TreeInfo* info); bool shouldEnableForceDark(TreeInfo* info); bool isForceInvertDark(TreeInfo& info); void prepareTreeImpl(TreeObserver& observer, TreeInfo& info, bool functorsNeedLayer); void pushStagingPropertiesChanges(TreeInfo& info); Loading