Loading libs/hwui/DisplayList.h +2 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,8 @@ public: mImpl->updateChildren(std::move(updateFn)); } void visit(std::function<void(const RenderNode&)> func) const { mImpl->visit(std::move(func)); } [[nodiscard]] explicit operator bool() const { return mImpl.get() != nullptr; } Loading libs/hwui/RenderNode.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -109,6 +109,13 @@ void RenderNode::output(std::ostream& output, uint32_t level) { output << std::endl; } void RenderNode::visit(std::function<void(const RenderNode&)> func) const { func(*this); if (mDisplayList) { mDisplayList.visit(func); } } int RenderNode::getUsageSize() { int size = sizeof(RenderNode); size += mStagingDisplayList.getUsedSize(); Loading libs/hwui/RenderNode.h +3 −5 Original line number Diff line number Diff line Loading @@ -129,10 +129,6 @@ public: StretchMask& getStretchMask() { return mStretchMask; } VirtualLightRefBase* getUserContext() const { return mUserContext.get(); } void setUserContext(VirtualLightRefBase* context) { mUserContext = context; } bool isPropertyFieldDirty(DirtyPropertyMask field) const { return mDirtyPropertyFields & field; } Loading Loading @@ -215,6 +211,8 @@ public: void output(std::ostream& output, uint32_t level); void visit(std::function<void(const RenderNode&)>) const; void setUsageHint(UsageHint usageHint) { mUsageHint = usageHint; } UsageHint usageHint() const { return mUsageHint; } Loading @@ -222,6 +220,7 @@ public: int64_t uniqueId() const { return mUniqueId; } void setIsTextureView() { mIsTextureView = true; } bool isTextureView() const { return mIsTextureView; } void markDrawStart(SkCanvas& canvas); void markDrawEnd(SkCanvas& canvas); Loading @@ -248,7 +247,6 @@ private: const int64_t mUniqueId; String8 mName; sp<VirtualLightRefBase> mUserContext; uint32_t mDirtyPropertyFields; RenderProperties mProperties; Loading libs/hwui/pipeline/skia/SkiaDisplayList.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,12 @@ void SkiaDisplayList::updateChildren(std::function<void(RenderNode*)> updateFn) } } void SkiaDisplayList::visit(std::function<void(const RenderNode&)> func) const { for (auto& child : mChildNodes) { child.getRenderNode()->visit(func); } } static bool intersects(const SkISize screenSize, const Matrix4& mat, const SkRect& bounds) { Vector3 points[] = { Vector3 {bounds.fLeft, bounds.fTop, 0}, Vector3 {bounds.fRight, bounds.fTop, 0}, Loading libs/hwui/pipeline/skia/SkiaDisplayList.h +2 −0 Original line number Diff line number Diff line Loading @@ -145,6 +145,8 @@ public: */ void updateChildren(std::function<void(RenderNode*)> updateFn); void visit(std::function<void(const RenderNode&)> func) const; /** * Returns true if there is a child render node that is a projection receiver. */ Loading Loading
libs/hwui/DisplayList.h +2 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,8 @@ public: mImpl->updateChildren(std::move(updateFn)); } void visit(std::function<void(const RenderNode&)> func) const { mImpl->visit(std::move(func)); } [[nodiscard]] explicit operator bool() const { return mImpl.get() != nullptr; } Loading
libs/hwui/RenderNode.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -109,6 +109,13 @@ void RenderNode::output(std::ostream& output, uint32_t level) { output << std::endl; } void RenderNode::visit(std::function<void(const RenderNode&)> func) const { func(*this); if (mDisplayList) { mDisplayList.visit(func); } } int RenderNode::getUsageSize() { int size = sizeof(RenderNode); size += mStagingDisplayList.getUsedSize(); Loading
libs/hwui/RenderNode.h +3 −5 Original line number Diff line number Diff line Loading @@ -129,10 +129,6 @@ public: StretchMask& getStretchMask() { return mStretchMask; } VirtualLightRefBase* getUserContext() const { return mUserContext.get(); } void setUserContext(VirtualLightRefBase* context) { mUserContext = context; } bool isPropertyFieldDirty(DirtyPropertyMask field) const { return mDirtyPropertyFields & field; } Loading Loading @@ -215,6 +211,8 @@ public: void output(std::ostream& output, uint32_t level); void visit(std::function<void(const RenderNode&)>) const; void setUsageHint(UsageHint usageHint) { mUsageHint = usageHint; } UsageHint usageHint() const { return mUsageHint; } Loading @@ -222,6 +220,7 @@ public: int64_t uniqueId() const { return mUniqueId; } void setIsTextureView() { mIsTextureView = true; } bool isTextureView() const { return mIsTextureView; } void markDrawStart(SkCanvas& canvas); void markDrawEnd(SkCanvas& canvas); Loading @@ -248,7 +247,6 @@ private: const int64_t mUniqueId; String8 mName; sp<VirtualLightRefBase> mUserContext; uint32_t mDirtyPropertyFields; RenderProperties mProperties; Loading
libs/hwui/pipeline/skia/SkiaDisplayList.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,12 @@ void SkiaDisplayList::updateChildren(std::function<void(RenderNode*)> updateFn) } } void SkiaDisplayList::visit(std::function<void(const RenderNode&)> func) const { for (auto& child : mChildNodes) { child.getRenderNode()->visit(func); } } static bool intersects(const SkISize screenSize, const Matrix4& mat, const SkRect& bounds) { Vector3 points[] = { Vector3 {bounds.fLeft, bounds.fTop, 0}, Vector3 {bounds.fRight, bounds.fTop, 0}, Loading
libs/hwui/pipeline/skia/SkiaDisplayList.h +2 −0 Original line number Diff line number Diff line Loading @@ -145,6 +145,8 @@ public: */ void updateChildren(std::function<void(RenderNode*)> updateFn); void visit(std::function<void(const RenderNode&)> func) const; /** * Returns true if there is a child render node that is a projection receiver. */ Loading