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

Side by Side Diff: cc/trees/thread_proxy.cc

Issue 839143002: Roll Chrome into Mojo. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase Created 5 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 | « cc/trees/thread_proxy.h ('k') | crypto/p224_spake.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/trees/thread_proxy.h" 5 #include "cc/trees/thread_proxy.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 } 181 }
182 182
183 void ThreadProxy::SetVisibleOnImplThread(CompletionEvent* completion, 183 void ThreadProxy::SetVisibleOnImplThread(CompletionEvent* completion,
184 bool visible) { 184 bool visible) {
185 TRACE_EVENT1("cc", "ThreadProxy::SetVisibleOnImplThread", "visible", visible); 185 TRACE_EVENT1("cc", "ThreadProxy::SetVisibleOnImplThread", "visible", visible);
186 impl().layer_tree_host_impl->SetVisible(visible); 186 impl().layer_tree_host_impl->SetVisible(visible);
187 impl().scheduler->SetVisible(visible); 187 impl().scheduler->SetVisible(visible);
188 completion->Signal(); 188 completion->Signal();
189 } 189 }
190 190
191 void ThreadProxy::SetThrottleFrameProduction(bool throttle) {
192 TRACE_EVENT1("cc", "ThreadProxy::SetThrottleFrameProduction", "throttle",
193 throttle);
194 Proxy::ImplThreadTaskRunner()->PostTask(
195 FROM_HERE,
196 base::Bind(&ThreadProxy::SetThrottleFrameProductionOnImplThread,
197 impl_thread_weak_ptr_, throttle));
198 }
199
200 void ThreadProxy::SetThrottleFrameProductionOnImplThread(bool throttle) {
201 TRACE_EVENT1("cc", "ThreadProxy::SetThrottleFrameProductionOnImplThread",
202 "throttle", throttle);
203 impl().scheduler->SetThrottleFrameProduction(throttle);
204 }
205
191 void ThreadProxy::DidLoseOutputSurface() { 206 void ThreadProxy::DidLoseOutputSurface() {
192 TRACE_EVENT0("cc", "ThreadProxy::DidLoseOutputSurface"); 207 TRACE_EVENT0("cc", "ThreadProxy::DidLoseOutputSurface");
193 DCHECK(IsMainThread()); 208 DCHECK(IsMainThread());
194 layer_tree_host()->DidLoseOutputSurface(); 209 layer_tree_host()->DidLoseOutputSurface();
195 210
196 { 211 {
197 DebugScopedSetMainThreadBlocked main_thread_blocked(this); 212 DebugScopedSetMainThreadBlocked main_thread_blocked(this);
198 213
199 // Return lost resources to their owners immediately. 214 // Return lost resources to their owners immediately.
200 BlockingTaskRunner::CapturePostTasks blocked( 215 BlockingTaskRunner::CapturePostTasks blocked(
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1332 1347
1333 impl().timing_history.DidActivateSyncTree(); 1348 impl().timing_history.DidActivateSyncTree();
1334 } 1349 }
1335 1350
1336 void ThreadProxy::DidPrepareTiles() { 1351 void ThreadProxy::DidPrepareTiles() {
1337 DCHECK(IsImplThread()); 1352 DCHECK(IsImplThread());
1338 impl().scheduler->DidPrepareTiles(); 1353 impl().scheduler->DidPrepareTiles();
1339 } 1354 }
1340 1355
1341 } // namespace cc 1356 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | crypto/p224_spake.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698