summaryrefslogtreecommitdiffstats
path: root/cc/surfaces
diff options
context:
space:
mode:
authorboliu <boliu@chromium.org>2016-01-13 11:27:37 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-13 19:28:58 +0000
commit0c1f91d8ae18676091fbe783beded96f862ab9b0 (patch)
tree3cd8dae324858a033be538442b71e7532b043ebb /cc/surfaces
parent2a18021a2ac515497ae64bd9535d386fb6da890b (diff)
downloadchromium_src-0c1f91d8ae18676091fbe783beded96f862ab9b0.zip
chromium_src-0c1f91d8ae18676091fbe783beded96f862ab9b0.tar.gz
chromium_src-0c1f91d8ae18676091fbe783beded96f862ab9b0.tar.bz2
Add begin frame paused signal
This avoids a deadlock situation in android webview where begin frames have stopped, but the blink main thread is blocked indefinitely waiting for activation. See bug for details. Plumb a signal that the BeginFrameSource is paused directly through BeginFrameSourceObserver, and force activate any pending activations when paused. This is similar to when compositor becomes invisible, but BFS allows webview send the signal without a hop to blink main thread. BUG=539373 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1536353003 Cr-Commit-Position: refs/heads/master@{#369238}
Diffstat (limited to 'cc/surfaces')
-rw-r--r--cc/surfaces/display_scheduler.cc6
-rw-r--r--cc/surfaces/display_scheduler.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/cc/surfaces/display_scheduler.cc b/cc/surfaces/display_scheduler.cc
index feb84ea..f87d4fb 100644
--- a/cc/surfaces/display_scheduler.cc
+++ b/cc/surfaces/display_scheduler.cc
@@ -152,6 +152,12 @@ bool DisplayScheduler::OnBeginFrameDerivedImpl(const BeginFrameArgs& args) {
return true;
}
+void DisplayScheduler::OnBeginFrameSourcePausedChanged(bool paused) {
+ // BeginFrameSources used with DisplayScheduler do not make use of this
+ // feature.
+ NOTIMPLEMENTED();
+}
+
base::TimeTicks DisplayScheduler::DesiredBeginFrameDeadlineTime() {
if (output_surface_lost_) {
TRACE_EVENT_INSTANT0("cc", "Lost output surface", TRACE_EVENT_SCOPE_THREAD);
diff --git a/cc/surfaces/display_scheduler.h b/cc/surfaces/display_scheduler.h
index 838af40..cb8a365 100644
--- a/cc/surfaces/display_scheduler.h
+++ b/cc/surfaces/display_scheduler.h
@@ -48,6 +48,7 @@ class CC_SURFACES_EXPORT DisplayScheduler : public BeginFrameObserverBase {
// BeginFrameObserverBase implementation
bool OnBeginFrameDerivedImpl(const BeginFrameArgs& args) override;
+ void OnBeginFrameSourcePausedChanged(bool paused) override;
BeginFrameSource* begin_frame_source_for_children() {
return begin_frame_source_for_children_.get();