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

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

Issue 554973002: Disable scheduler deadline task on battery power in Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove redundant != NULL Created 6 years, 2 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
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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 impl().scheduler->DidSwapBuffersComplete(); 345 impl().scheduler->DidSwapBuffersComplete();
346 Proxy::MainThreadTaskRunner()->PostTask( 346 Proxy::MainThreadTaskRunner()->PostTask(
347 FROM_HERE, 347 FROM_HERE,
348 base::Bind(&ThreadProxy::DidCompleteSwapBuffers, main_thread_weak_ptr_)); 348 base::Bind(&ThreadProxy::DidCompleteSwapBuffers, main_thread_weak_ptr_));
349 } 349 }
350 350
351 BeginFrameSource* ThreadProxy::ExternalBeginFrameSource() { 351 BeginFrameSource* ThreadProxy::ExternalBeginFrameSource() {
352 return impl().layer_tree_host_impl.get(); 352 return impl().layer_tree_host_impl.get();
353 } 353 }
354 354
355 base::PowerMonitor* ThreadProxy::PowerMonitor() {
356 return base::PowerMonitor::Get();
357 }
358
355 void ThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) { 359 void ThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) {
356 impl().layer_tree_host_impl->WillBeginImplFrame(args); 360 impl().layer_tree_host_impl->WillBeginImplFrame(args);
357 } 361 }
358 362
359 void ThreadProxy::OnCanDrawStateChanged(bool can_draw) { 363 void ThreadProxy::OnCanDrawStateChanged(bool can_draw) {
360 TRACE_EVENT1( 364 TRACE_EVENT1(
361 "cc", "ThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw); 365 "cc", "ThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw);
362 DCHECK(IsImplThread()); 366 DCHECK(IsImplThread());
363 impl().scheduler->SetCanDraw(can_draw); 367 impl().scheduler->SetCanDraw(can_draw);
364 UpdateBackgroundAnimateTicking(); 368 UpdateBackgroundAnimateTicking();
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 1390
1387 impl().timing_history.DidActivateSyncTree(); 1391 impl().timing_history.DidActivateSyncTree();
1388 } 1392 }
1389 1393
1390 void ThreadProxy::DidManageTiles() { 1394 void ThreadProxy::DidManageTiles() {
1391 DCHECK(IsImplThread()); 1395 DCHECK(IsImplThread());
1392 impl().scheduler->DidManageTiles(); 1396 impl().scheduler->DidManageTiles();
1393 } 1397 }
1394 1398
1395 } // namespace cc 1399 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698