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

Side by Side Diff: cc/output/context_cache_controller.cc

Issue 2651703004: Temporarily disable context idle cleanup. (Closed)
Patch Set: Disable unit tests as well Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/output/context_cache_controller_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/output/context_cache_controller.h" 5 #include "cc/output/context_cache_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 current_idle_generation), 132 current_idle_generation),
133 base::TimeDelta::FromSeconds(kIdleCleanupDelaySeconds)); 133 base::TimeDelta::FromSeconds(kIdleCleanupDelaySeconds));
134 } 134 }
135 135
136 void ContextCacheController::InvalidatePendingIdleCallbacks() { 136 void ContextCacheController::InvalidatePendingIdleCallbacks() {
137 base::AutoLock hold(current_idle_generation_lock_); 137 base::AutoLock hold(current_idle_generation_lock_);
138 ++current_idle_generation_; 138 ++current_idle_generation_;
139 } 139 }
140 140
141 void ContextCacheController::OnIdle(uint32_t idle_generation) { 141 void ContextCacheController::OnIdle(uint32_t idle_generation) {
142 // TODO(ericrk): Temporarily disabling this to investigate whether this
143 // code regressed scroll latency on Android. crbug.com/664181
144 #if defined(OS_ANDROID)
145 return;
146 #endif
147
142 // First check if we should run our idle callback at all. If we have become 148 // First check if we should run our idle callback at all. If we have become
143 // busy since scheduling, just schedule another idle callback and return. 149 // busy since scheduling, just schedule another idle callback and return.
144 { 150 {
145 base::AutoLock hold(current_idle_generation_lock_); 151 base::AutoLock hold(current_idle_generation_lock_);
146 if (current_idle_generation_ != idle_generation) { 152 if (current_idle_generation_ != idle_generation) {
147 PostIdleCallback(current_idle_generation_); 153 PostIdleCallback(current_idle_generation_);
148 return; 154 return;
149 } 155 }
150 } 156 }
151 157
(...skipping 13 matching lines...) Expand all
165 context_support_->SetAggressivelyFreeResources(true); 171 context_support_->SetAggressivelyFreeResources(true);
166 context_support_->SetAggressivelyFreeResources(false); 172 context_support_->SetAggressivelyFreeResources(false);
167 173
168 callback_pending_ = false; 174 callback_pending_ = false;
169 175
170 if (context_lock_) 176 if (context_lock_)
171 context_lock_->Release(); 177 context_lock_->Release();
172 } 178 }
173 179
174 } // namespace cc 180 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/output/context_cache_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698