-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Asset file for trimmed captures #1644
base: dev
Are you sure you want to change the base?
Asset file for trimmed captures #1644
Conversation
CI gfxreconstruct build queued with queue ID 226269. |
CI gfxreconstruct build queued with queue ID 226350. |
f5cd9a6
to
79ee258
Compare
CI gfxreconstruct build queued with queue ID 226412. |
CI gfxreconstruct build # 4484 running. |
CI gfxreconstruct build # 4484 failed. |
79ee258
to
60bc814
Compare
CI gfxreconstruct build queued with queue ID 227571. |
60bc814
to
54585d4
Compare
CI gfxreconstruct build queued with queue ID 227583. |
CI gfxreconstruct build # 4500 running. |
CI gfxreconstruct build # 4500 failed. |
CI gfxreconstruct build queued with queue ID 228412. |
CI gfxreconstruct build # 4514 running. |
CI gfxreconstruct build # 4514 failed. |
e21b66f
to
1cc22f0
Compare
CI gfxreconstruct build queued with queue ID 228788. |
CI gfxreconstruct build # 4516 running. |
CI gfxreconstruct build # 4516 failed. |
CI gfxreconstruct build queued with queue ID 228847. |
CI gfxreconstruct build # 4518 running. |
CI gfxreconstruct build # 4518 failed. |
CI gfxreconstruct build queued with queue ID 229187. |
CI gfxreconstruct build # 4522 running. |
CI gfxreconstruct build # 4522 failed. |
CI gfxreconstruct build queued with queue ID 229275. |
CI gfxreconstruct build # 4524 running. |
CI gfxreconstruct build # 4524 failed. |
CI gfxreconstruct build queued with queue ID 229670. |
CI gfxreconstruct build # 4527 running. |
CI gfxreconstruct build # 5113 running. |
CI gfxreconstruct build # 5113 failed. |
framework/decode/file_processor.cpp
Outdated
{ | ||
success = ProcessFileHeader(); | ||
size_t last_slash_pos = filename.find_last_of("\\/"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use gfxrecon::util::filepath::GetBasedir
for this?
|
||
std::string FileProcessor::ApplyAbsolutePath(const std::string& file) | ||
{ | ||
if (absolute_path_.empty()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use gfxrecon::util::filepath::Join
for this? I don't think you'd even need to check absoluate_path_.empty()
.
@@ -127,8 +131,6 @@ class ApiCaptureManager | |||
|
|||
bool IsTrimHotkeyPressed() { return common_manager_->IsTrimHotkeyPressed(); } | |||
|
|||
CaptureSettings::RuntimeTriggerState GetRuntimeTriggerState() { return common_manager_->GetRuntimeTriggerState(); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this deleted in this PR just for cleanup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More or less yes. Since now there are 2 runtime android options GetRuntimeTriggerState
didn't serve any great purpose returning just the trigger state. Now GetRuntimeTriggerEnabled
, GetRuntimeTriggerDisabled
and the new RuntimeWriteAssetsEnabled
and RuntimeWriteAssetsDisabled
fetch the runtime values themselves
CaptureSettings::LoadRunTimeEnvVarSettings(&settings); | ||
bool write_assets = settings.GetTraceSettings().runtime_write_assets; | ||
|
||
if (previous_write_assets_ != write_assets) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expected write_assets_
to be set from write_assets
and for previous_write_assets_
to be the previous value of write_assets_
. I don't have a good suggestion except it looks like write_assets_
is a one-shot, so could write_assets
be write_assets_requested
and previous_write_assets_
be write_assets_already_requested_
? (Or some such)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The initial idea with this was that an asset dump could be triggered by setting an Android property to true.
Then I realized that this would require that once the dump is finished the property is turned back to false so that the next request can be tracked again. Since the user can not be in position to know when the dump is finished, the resetting of the property must be done by the layer, but this requires elevated permissions.
So instead of that the dump is triggered when the property changes value. So:
write_assets
is the current android property valueprevious_write_assets_
is the value of the android property the last time a dump was triggered.
Comparing those two we can catch changes.write_assets_
is the internal boolean that triggers a dump. Apart from the android property this can also be set to true also by calling the exposed callback function
framework/encode/capture_manager.cpp
Outdated
{ | ||
std::string asset_filename = base_filename; | ||
|
||
size_t dot_pos = base_filename.rfind('.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see if the functions GetFilenameStem
and GetFilenameExtension
in gfxrecon::util::filepath
can be used for parsing out the extension.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't aware of that utility. I will try to use it wherever seems fit.
890893b
to
890f135
Compare
CI gfxreconstruct build queued with queue ID 283131. |
CI gfxreconstruct build # 5125 running. |
CI gfxreconstruct build # 5125 passed. |
890f135
to
6777d64
Compare
CI gfxreconstruct build queued with queue ID 283925. |
CI gfxreconstruct build # 5140 running. |
CI gfxreconstruct build # 5140 passed. |
CI gfxreconstruct build queued with queue ID 284021. |
CI gfxreconstruct build # 5141 running. |
CI gfxreconstruct build # 5141 passed. |
No description provided.