If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

[LayerScope] Start layer recording on demand.

RESOLVED WORKSFORME

Status

()

Core
Graphics
RESOLVED WORKSFORME
4 years ago
4 years ago

People

(Reporter: cjku, Assigned: mtseng)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
LayerScope reads "gfx.layerscope.enabled" in the beginning of B2G process created. Which means we need to restart B2G if we want to dump layer image if this value is original false.

It's more convenient if we can start and stop recording, without restart Chrome process, on demand.
Make sure the preferences are only ever accessed from the main thread.
This is a misunderstanding of the current code, I think.  "gfx.layerscope.enabled" only controls whether the process listens on the port or not; this is just a security control, because there is no other security around getting the layerscope data (in other words, reading the screen).  It does not control whether the data is being captured or streamed.

There is no downside to running with "gfx.layerscope.enabled" set to "true", and this might not be a bad idea for a default for developer builds.

All of the layerscope code is gated on the "gDebugConnected" variable, which is true only if something is actively connected to the port.  If it's false, the "begin frame" and send-check functions just return, and no data gets captured.  See http://dxr.mozilla.org/mozilla-central/source/gfx/layers/LayerScope.cpp#434 and http://dxr.mozilla.org/mozilla-central/source/gfx/layers/LayerScope.cpp#287

So starting and stopping is just a matter of connecting and disconnecting.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.