Skip to content

Commit

Permalink
Frame boundary option change for the tracing UI (#1209)
Browse files Browse the repository at this point in the history
  • Loading branch information
kocdemir committed Sep 9, 2022
1 parent 02547e3 commit 8f638e0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
9 changes: 5 additions & 4 deletions gapic/src/main/com/google/gapid/views/TracerDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ private static class TraceInput extends Composite {
private final Spinner duration;
private final Label durationUnit;
private final Label startUnit;
private final Button ignoreAndroidFrameBoundary;
private final Button useAndroidFrameBoundaryExtension;
private final Button withoutBuffering;
private final Button includeUnsupportedExtensions;
private final Button loadValidationLayer;
Expand Down Expand Up @@ -490,8 +490,9 @@ protected String createAndShowDialog(String current) {
duration.setVisible(DURATION_FRAMES_MAX > 1);
durationUnit = createLabel(durGroup, DURATION_FRAMES_UNIT);
durationUnit.setVisible(DURATION_FRAMES_MAX > 1);
ignoreAndroidFrameBoundary = createCheckbox(durGroup, "Ignore ANDROID_frame_boundary extension", true);
ignoreAndroidFrameBoundary.setEnabled(true);
useAndroidFrameBoundaryExtension = createCheckbox(durGroup, "Use ANDROID_frame_boundary extension", false,
"Enables using ANDROID_frame_boundary extension to define the frame boundaries. Otherwise, the present calls are used.");
useAndroidFrameBoundaryExtension.setEnabled(true);

Group optGroup = withLayoutData(
createGroup(this, "Trace Options", new GridLayout(2, false)),
Expand Down Expand Up @@ -1031,7 +1032,7 @@ public TraceRequest getTraceRequest(Settings settings) {
.setUri(traceTarget.getText())
.setAdditionalCommandLineArgs(arguments.getText())
.setFramesToCapture(duration.getSelection())
.setIgnoreFrameBoundaryDelimiters(ignoreAndroidFrameBoundary.getSelection())
.setIgnoreFrameBoundaryDelimiters(!useAndroidFrameBoundaryExtension.getSelection())
.setNoBuffer(withoutBuffering.getSelection())
.setHideUnknownExtensions(!includeUnsupportedExtensions.getSelection())
.setServerLocalSavePath(output.getAbsolutePath())
Expand Down
9 changes: 9 additions & 0 deletions gapic/src/main/com/google/gapid/widgets/Widgets.java
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,15 @@ public static Button createCheckbox(Composite parent, String label, boolean chec
return button;
}

public static Button createCheckbox(Composite parent, String label, boolean checked, String tooltipText) {
// Workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=561592 - set label first.
Button button = new Button(parent, SWT.CHECK);
button.setText(label);
button.setSelection(checked);
button.setToolTipText(tooltipText);
return button;
}

public static Button createCheckbox(
Composite parent, String label, boolean checked, Listener listener) {
// Workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=561592 - set label first.
Expand Down

0 comments on commit 8f638e0

Please sign in to comment.