Skip to content

Abort PM4/GFXR capture when the device is locked or app is not actively#758

Open
elviscapiaq wants to merge 4 commits intogoogle:mainfrom
elviscapiaq:fix_capture
Open

Abort PM4/GFXR capture when the device is locked or app is not actively#758
elviscapiaq wants to merge 4 commits intogoogle:mainfrom
elviscapiaq:fix_capture

Conversation

@elviscapiaq
Copy link
Collaborator

running

@elviscapiaq
Copy link
Collaborator Author

Tested on Android XR device and a pixel 4 cellphone.

wangra-google
wangra-google previously approved these changes Feb 19, 2026
wangra-google
wangra-google previously approved these changes Feb 19, 2026
wangra-google
wangra-google previously approved these changes Feb 23, 2026
// `wait_for_ready_to_retrieve` will skip subsequent steps.
absl::StatusOr<GfxrCaptureControlFlow> TriggerGfxrCapture(
const AndroidDevice& device, const GlobalOptions& options,
AndroidDevice* device, const GlobalOptions& options,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to just pass const CommandContext& ctx here rather than AndroidDevice* device, const GlobalOptions& options? In general passing around raw pointers is better avoided, I believe https://google.github.io/styleguide/cppguide.html#Ownership_and_Smart_Pointers

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment on lines 592 to +594
void TraceDialog::OnTraceClicked()
{
Dive::AndroidDevice* device = Dive::GetDeviceManager().GetDevice();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this check be put into a separate function? Something like Dive::AndroidDevice* TraceDialog::GetAndValidateDevice() so that the block isn't duplicated here and in OnGfxrCaptureClicked?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants