Enable simplified version of RootRenderNode for host
Bug: 117921091 Test: all tests should pass Change-Id: Iae6e5f37eb11cdcffe29336ce2eda6ab6897385c
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user