Commit 7fce3f9f authored by Daniel Nicoara's avatar Daniel Nicoara Committed by Commit Bot

[Chromecast] Log when the overlay state changes

Provides more insight on the overlay state in the logs. Typically this
is used to signal that a video should be visible on Chromecast.

This only triggers on changes, so it should be infrequent enough not to
spam the log, but useful enough for developers to know when overlays are
in use.

BUG=b/79195588
TEST=Ran on device and verified the state change is shown in logs.

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel
Change-Id: I8af803ee1b28d9588d3cf9baee1af0804b5ece92
Reviewed-on: https://chromium-review.googlesource.com/1090795Reviewed-by: default avatarSergey Volk <servolk@chromium.org>
Reviewed-by: default avatarDaniele Castagna <dcastagna@chromium.org>
Commit-Queue: Daniel Nicoara <dnicoara@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565453}
parent 97a39414
......@@ -62,6 +62,11 @@ bool OverlayStrategyUnderlayCast::Attempt(
}
}
if (is_using_overlay_ != found_underlay) {
is_using_overlay_ = found_underlay;
VLOG(1) << (found_underlay ? "Overlay activated" : "Overlay deactivated");
}
if (found_underlay) {
// If the primary plane shows up in the candidates list make sure it isn't
// opaque otherwise the video underlay won't be visible.
......
......@@ -39,6 +39,9 @@ class VIZ_SERVICE_EXPORT OverlayStrategyUnderlayCast
OverlayProcessor::StrategyType GetUMAEnum() const override;
private:
// Keep track if an overlay is being used on the previous frame.
bool is_using_overlay_ = false;
DISALLOW_COPY_AND_ASSIGN(OverlayStrategyUnderlayCast);
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment