Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95eab8ae authored by Fedor Kudasov's avatar Fedor Kudasov Committed by Android (Google) Code Review
Browse files

Merge "Enable simplified version of RootRenderNode for host"

parents 99367a7b 09cfce08
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -195,6 +195,7 @@ cc_defaults {
        "RecordingCanvas.cpp",
        "RenderNode.cpp",
        "RenderProperties.cpp",
        "RootRenderNode.cpp",
        "SkiaCanvas.cpp",
        "VectorDrawable.cpp",
    ],
@@ -250,7 +251,6 @@ cc_defaults {
                "ProfileData.cpp",
                "ProfileDataContainer.cpp",
                "Readback.cpp",
                "RootRenderNode.cpp",
                "TreeInfo.cpp",
                "WebViewFunctorManager.cpp",
                "protos/graphicsstats.proto",
+0 −2
Original line number Diff line number Diff line
@@ -155,11 +155,9 @@ void BaseRenderNodeAnimator::pushStaging(AnimationContext& context) {
        RenderNode* oldTarget = mTarget;
        mTarget = mStagingTarget;
        mStagingTarget = nullptr;
#ifdef __ANDROID__ // Layoutlib does not support RenderNode
        if (oldTarget && oldTarget != mTarget) {
            oldTarget->onAnimatorTargetChanged(this);
        }
#endif
    }

    if (!mHasStartValue) {
+20 −0
Original line number Diff line number Diff line
@@ -16,10 +16,13 @@

#include "RootRenderNode.h"

#ifdef __ANDROID__ // Layoutlib does not support Looper (windows)
#include <utils/Looper.h>
#endif

namespace android::uirenderer {

#ifdef __ANDROID__ // Layoutlib does not support Looper
class FinishAndInvokeListener : public MessageHandler {
public:
    explicit FinishAndInvokeListener(PropertyValuesAnimatorSet* anim) : mAnimator(anim) {
@@ -282,5 +285,22 @@ private:
AnimationContext* ContextFactoryImpl::createAnimationContext(renderthread::TimeLord& clock) {
    return new AnimationContextBridge(clock, mRootNode);
}
#else

void RootRenderNode::prepareTree(TreeInfo& info) {
    info.errorHandler = mErrorHandler.get();
    info.updateWindowPositions = true;
    RenderNode::prepareTree(info);
    info.updateWindowPositions = false;
    info.errorHandler = nullptr;
}

void RootRenderNode::attachAnimatingNode(RenderNode* animatingNode) { }

void RootRenderNode::destroy() { }

void RootRenderNode::addVectorDrawableAnimator(PropertyValuesAnimatorSet* anim) { }

#endif

}  // namespace android::uirenderer
+2 −0
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ private:
    void detachVectorDrawableAnimator(PropertyValuesAnimatorSet* anim);
};

#ifdef __ANDROID__ // Layoutlib does not support Animations
class ANDROID_API ContextFactoryImpl : public IContextFactory {
public:
    ANDROID_API explicit ContextFactoryImpl(RootRenderNode* rootNode) : mRootNode(rootNode) {}
@@ -84,5 +85,6 @@ public:
private:
    RootRenderNode* mRootNode;
};
#endif

}  // namespace android::uirenderer