android: Ensure that rendering operations are serialized to prevent timing errors
This commit is contained in:
parent
7bfa542479
commit
5dd7504a37
@ -53,7 +53,7 @@ public class ShaderPlugin extends DoricJavaPlugin {
|
|||||||
super(doricContext);
|
super(doricContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
@DoricMethod
|
@DoricMethod(thread = ThreadMode.UI)
|
||||||
public void render(final JSObject jsObject, final DoricPromise promise) {
|
public void render(final JSObject jsObject, final DoricPromise promise) {
|
||||||
final DoricPerformanceProfile profile = getDoricContext().getPerformanceProfile();
|
final DoricPerformanceProfile profile = getDoricContext().getPerformanceProfile();
|
||||||
profile.prepare(DoricPerformanceProfile.STEP_RENDER);
|
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) {
|
public void command(final JSObject jsObject, final DoricPromise doricPromise) {
|
||||||
getDoricContext().getDriver().asyncCall(new Callable<Object>() {
|
getDoricContext().getDriver().asyncCall(new Callable<Object>() {
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user