env.go RawHistoryFolder

1package cef
2
3import (
4	"os"
5	"strconv"
6	"strings"
7)
8
9const (
10	cefExternalBeginFrameEnvVar   = "DUMBER_CEF_EXTERNAL_BEGIN_FRAME"
11	cefWindowlessFrameRateEnvVar  = "DUMBER_CEF_WINDOWLESS_FRAME_RATE"
12	cefEnableWebAuthnUnsafeEnvVar = "DUMBER_CEF_ENABLE_WEBAUTHN_UNSAFE"
13	cefChromiumFlagsEnvVar        = "DUMBER_CEF_CHROMIUM_FLAGS"
14	cefEnableVAAPIEnvVar          = "DUMBER_CEF_ENABLE_VAAPI"
15	cefRenderNodeEnvVar           = "DUMBER_CEF_RENDER_NODE"
16	cefRenderStallRecoveryEnvVar  = "DUMBER_CEF_RENDER_STALL_RECOVERY"
17	cefRenderStallBacktraceEnvVar = "DUMBER_CEF_RENDER_STALL_BACKTRACE"
18	cefScaleProbeEnvVar           = "DUMBER_CEF_SCALE_PROBE"
19	cef2GTKTraceScaleEnvVar       = "PUREGO_CEF2GTK_TRACE_SCALE"
20)
21
22// envBoolEnabled returns true when the given environment variable is set
23// to a truthy value ("1", "true", "yes", "on").
24func envBoolEnabled(envVar string) bool {
25	switch strings.ToLower(strings.TrimSpace(os.Getenv(envVar))) {
26	case "1", "true", "yes", "on":
27		return true
28	default:
29		return false
30	}
31}
32
33// externalBeginFrameEnabled reports whether CEF produces frames on BeginFrame
34// ticks driven by the GTK frame clock instead of its own timer. It is enabled by
35// default: the embedder's frame clock is the cadence the compositor samples, so
36// asking CEF for a frame on each tick aligns production with presentation. A
37// falsy value restores CEF's internal cadence.
38//
39// This is an experimental default under observation: the tick loop requests a
40// frame on every tick regardless of the configured capture rate, and no
41// frame-timing measurement yet shows an improvement over CEF's own timer.
42func externalBeginFrameEnabled() bool {
43	switch strings.ToLower(strings.TrimSpace(os.Getenv(cefExternalBeginFrameEnvVar))) {
44	case "0", "false", "no", "off":
45		return false
46	default:
47		return true
48	}
49}
50
51// windowlessFrameRateOverride returns an explicitly pinned OSR frame rate. A
52// pinned rate takes precedence over the configured value and disables adaptive
53// monitor-refresh polling, so a run can be compared at a single cadence.
54func windowlessFrameRateOverride() (int32, bool) {
55	raw := strings.TrimSpace(os.Getenv(cefWindowlessFrameRateEnvVar))
56	if raw == "" {
57		return 0, false
58	}
59	rate, err := strconv.ParseInt(raw, 10, 32)
60	if err != nil || rate <= 0 {
61		return 0, false
62	}
63	return int32(rate), true
64}
65
66// windowlessFrameRatePinned reports whether the environment pins the OSR frame
67// rate, which also suspends adaptive monitor-refresh polling.
68func windowlessFrameRatePinned() bool {
69	_, pinned := windowlessFrameRateOverride()
70	return pinned
71}
72
73func cefWebAuthnUnsafeEnabled() bool {
74	return envBoolEnabled(cefEnableWebAuthnUnsafeEnvVar)
75}
76
77func renderStallRecoveryEnabled() bool {
78	return envBoolEnabled(cefRenderStallRecoveryEnvVar)
79}
80
81func renderStallBacktraceEnabled() bool {
82	return envBoolEnabled(cefRenderStallBacktraceEnvVar)
83}
84
85func cefScaleProbeEnabled() bool {
86	return envBoolEnabled(cefScaleProbeEnvVar) || os.Getenv(cef2GTKTraceScaleEnvVar) != ""
87}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close