I also got a browsertest that can reproduce this problem. https://chromium-review.git.corp.google.com/c/chromium/src/+/7849217
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// If the pending frame is already used for last WebXR Frame, we must be
// waiting for the overlay texture to be submitted for the last frame. DoWhy not `waiting_for_overlay_` from the frame here?
if ((!webxr_visible_ && !on_webxr_submitted_) || webxr_has_pose_ ||
(pending_frame_ && !pending_frame_->frame_data_)) {Semi-existing, but this is quite the conditional. Can we break this into helper bools with their own comments/better explanatory names?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// If the pending frame is already used for last WebXR Frame, we must be
// waiting for the overlay texture to be submitted for the last frame. DoWhy not `waiting_for_overlay_` from the frame here?
I can assert waiting_for_overlay_, but I try to prevent it from sending a null frame data to renderer. Another solution is reset webxr_has_pose_ in RequestNextOverlayPose when pending frame is null. But I feel it is still better to guarantee frame data is always good to send.
if ((!webxr_visible_ && !on_webxr_submitted_) || webxr_has_pose_ ||
(pending_frame_ && !pending_frame_->frame_data_)) {Semi-existing, but this is quite the conditional. Can we break this into helper bools with their own comments/better explanatory names?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// If the pending frame is already used for last WebXR Frame, we must be
// waiting for the overlay texture to be submitted for the last frame. DoYong Li (xWF)Why not `waiting_for_overlay_` from the frame here?
I can assert waiting_for_overlay_, but I try to prevent it from sending a null frame data to renderer. Another solution is reset webxr_has_pose_ in RequestNextOverlayPose when pending frame is null. But I feel it is still better to guarantee frame data is always good to send.
Actually I cannot do waiting_for_overlay_ here, because that doesn't mean we should delay GetFrameData. waiting_for_overlay_ can be true when pending_frame_ has valid frame data and we should proceed.
// If the pending frame is already used for last WebXR Frame, we must be
// waiting for the overlay texture to be submitted for the last frame. DoYong Li (xWF)Why not `waiting_for_overlay_` from the frame here?
Yong Li (xWF)I can assert waiting_for_overlay_, but I try to prevent it from sending a null frame data to renderer. Another solution is reset webxr_has_pose_ in RequestNextOverlayPose when pending frame is null. But I feel it is still better to guarantee frame data is always good to send.
Actually I cannot do waiting_for_overlay_ here, because that doesn't mean we should delay GetFrameData. waiting_for_overlay_ can be true when pending_frame_ has valid frame data and we should proceed.
Done
if ((!webxr_visible_ && !on_webxr_submitted_) || webxr_has_pose_ ||
(pending_frame_ && !pending_frame_->frame_data_)) {Yong Li (xWF)Semi-existing, but this is quite the conditional. Can we break this into helper bools with their own comments/better explanatory names?
will give a try
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if ((!webxr_visible_ && !on_webxr_submitted_) || webxr_has_pose_) {
return true;
}Maybe split this up once more e.g.
```
// If we've already given out a pose for the current frame delay
if (webxr_has_pose_) {
return true;
}
If we aren't visible and the browser is not waiting to learn that we've submitted a frame we should delay. If the browser *is* waiting to learn that we've submitted a frame though, we can give out a pose as though we are visible.
if (!webxr_visible_ && !on_webxr_submitted)) {
return true;
}
```
Comments I left can probably be improved.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if ((!webxr_visible_ && !on_webxr_submitted_) || webxr_has_pose_) {
return true;
}Maybe split this up once more e.g.
```
// If we've already given out a pose for the current frame delay
if (webxr_has_pose_) {
return true;
}If we aren't visible and the browser is not waiting to learn that we've submitted a frame we should delay. If the browser *is* waiting to learn that we've submitted a frame though, we can give out a pose as though we are visible.
if (!webxr_visible_ && !on_webxr_submitted)) {
return true;
}
```Comments I left can probably be improved.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Fix a possible deadlock in OpenXRRenderLoop
Prevent from using a pending_frame_ with invalid frame_data_
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |