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

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

Issue 1762823002: Remove runtime toggling of throttling frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « cc/trees/threaded_channel.h ('k') | cc/trees/threaded_channel_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/threaded_channel.h" 5 #include "cc/trees/threaded_channel.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/animation/animation_events.h" 10 #include "cc/animation/animation_events.h"
(...skipping 16 matching lines...) Expand all
27 .proxy_main_weak_factory.GetWeakPtr()) { 27 .proxy_main_weak_factory.GetWeakPtr()) {
28 DCHECK(IsMainThread()); 28 DCHECK(IsMainThread());
29 } 29 }
30 30
31 ThreadedChannel::~ThreadedChannel() { 31 ThreadedChannel::~ThreadedChannel() {
32 TRACE_EVENT0("cc", "ThreadChannel::~ThreadChannel"); 32 TRACE_EVENT0("cc", "ThreadChannel::~ThreadChannel");
33 DCHECK(IsMainThread()); 33 DCHECK(IsMainThread());
34 DCHECK(!IsInitialized()); 34 DCHECK(!IsInitialized());
35 } 35 }
36 36
37 void ThreadedChannel::SetThrottleFrameProductionOnImpl(bool throttle) {
38 DCHECK(IsMainThread());
39 ImplThreadTaskRunner()->PostTask(
40 FROM_HERE, base::Bind(&ProxyImpl::SetThrottleFrameProductionOnImpl,
41 proxy_impl_weak_ptr_, throttle));
42 }
43
44 void ThreadedChannel::UpdateTopControlsStateOnImpl(TopControlsState constraints, 37 void ThreadedChannel::UpdateTopControlsStateOnImpl(TopControlsState constraints,
45 TopControlsState current, 38 TopControlsState current,
46 bool animate) { 39 bool animate) {
47 DCHECK(IsMainThread()); 40 DCHECK(IsMainThread());
48 ImplThreadTaskRunner()->PostTask( 41 ImplThreadTaskRunner()->PostTask(
49 FROM_HERE, 42 FROM_HERE,
50 base::Bind(&ProxyImpl::UpdateTopControlsStateOnImpl, proxy_impl_weak_ptr_, 43 base::Bind(&ProxyImpl::UpdateTopControlsStateOnImpl, proxy_impl_weak_ptr_,
51 constraints, current, animate)); 44 constraints, current, animate));
52 } 45 }
53 46
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 351
359 ThreadedChannel::MainThreadOnly::~MainThreadOnly() {} 352 ThreadedChannel::MainThreadOnly::~MainThreadOnly() {}
360 353
361 ThreadedChannel::CompositorThreadOnly::CompositorThreadOnly( 354 ThreadedChannel::CompositorThreadOnly::CompositorThreadOnly(
362 base::WeakPtr<ProxyMain> proxy_main_weak_ptr) 355 base::WeakPtr<ProxyMain> proxy_main_weak_ptr)
363 : proxy_main_weak_ptr(proxy_main_weak_ptr) {} 356 : proxy_main_weak_ptr(proxy_main_weak_ptr) {}
364 357
365 ThreadedChannel::CompositorThreadOnly::~CompositorThreadOnly() {} 358 ThreadedChannel::CompositorThreadOnly::~CompositorThreadOnly() {}
366 359
367 } // namespace cc 360 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/threaded_channel.h ('k') | cc/trees/threaded_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698