Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Unified Diff: ui/compositor/compositor.cc

Issue 996453002: Allow ui::Compositor to disable commits during tab-switch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use DeferCommits instead Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« cc/trees/proxy.h ('K') | « ui/compositor/compositor.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositor.cc
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 6293c2c19cf6d6e2fbb2fda6a548b18226e15cfa..f1758cee5ba810d7b2602c300404e64955af9480 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -76,7 +76,6 @@ Compositor::Compositor(gfx::AcceleratedWidget widget,
device_scale_factor_(0.0f),
last_started_frame_(0),
last_ended_frame_(0),
- disable_schedule_composite_(false),
compositor_lock_(NULL),
layer_animator_collection_(this),
weak_ptr_factory_(this) {
@@ -294,12 +293,8 @@ void Compositor::BeginMainFrameNotExpectedSoon() {
}
void Compositor::Layout() {
- // We're sending damage that will be addressed during this composite
- // cycle, so we don't need to schedule another composite to address it.
- disable_schedule_composite_ = true;
if (root_layer_)
root_layer_->SendDamagedRects();
- disable_schedule_composite_ = false;
}
void Compositor::RequestNewOutputSurface() {
@@ -330,6 +325,10 @@ void Compositor::DidCompleteSwapBuffers() {
OnCompositingEnded(this));
}
+void Compositor::SetDeferCommits(bool defer_commits) {
+ host_->SetDeferCommits(defer_commits);
danakj 2015/03/11 17:22:55 You'll now have a state where commits are deferred
ccameron 2015/03/11 21:46:43 The timeout for the lock is only so that the UI do
+}
+
void Compositor::DidPostSwapBuffers() {
base::TimeTicks start_time = gfx::FrameTime::Now();
FOR_EACH_OBSERVER(CompositorObserver, observer_list_,
« cc/trees/proxy.h ('K') | « ui/compositor/compositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698