android: Ensure that rendering operations are serialized to prevent timing errors

This commit is contained in:
pengfei.zhou 2022-07-27 12:03:41 +08:00 committed by osborn
parent 7bfa542479
commit 5dd7504a37

View File

@ -53,7 +53,7 @@ public class ShaderPlugin extends DoricJavaPlugin {
super(doricContext);
}
@DoricMethod
@DoricMethod(thread = ThreadMode.UI)
public void render(final JSObject jsObject, final DoricPromise promise) {
final DoricPerformanceProfile profile = getDoricContext().getPerformanceProfile();
profile.prepare(DoricPerformanceProfile.STEP_RENDER);
@ -120,7 +120,7 @@ public class ShaderPlugin extends DoricJavaPlugin {
});
}
@DoricMethod
@DoricMethod(thread = ThreadMode.UI)
public void command(final JSObject jsObject, final DoricPromise doricPromise) {
getDoricContext().getDriver().asyncCall(new Callable<Object>() {
@Override