This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-Qt/doric/plugin/DoricShaderPlugin.cpp
2021-05-20 18:27:45 +08:00

20 lines
605 B
C++

#include <QDebug>
#include "../shader/DoricRootNode.h"
#include "DoricShaderPlugin.h"
void DoricShaderPlugin::render(QJSValue jsValue, QString callbackId) {
qDebug() << getContext();
getContext()->getDriver()->asyncCall(
[this, jsValue] {
QString viewId = jsValue.property("id").toString();
DoricRootNode *rootNode = getContext()->getRootNode();
if (rootNode->getId().isEmpty() && jsValue.property("type").toString() == "Root") {
rootNode->setId(viewId);
rootNode->blend(jsValue.property("props"));
}
},
DoricThreadMode::UI);
}