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

Side by Side Diff: cc/scheduler/scheduler_unittest.cc

Issue 22926024: cc: Control activation from the Scheduler (Closed) Base URL: http://git.chromium.org/chromium/src.git@schedOutputSurface4
Patch Set: git cl format Created 7 years, 3 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/scheduler/scheduler_state_machine.cc ('k') | cc/test/fake_layer_tree_host_impl_client.h » ('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/scheduler/scheduler.h" 5 #include "cc/scheduler/scheduler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 swap_will_happen_if_draw_happens_); 107 swap_will_happen_if_draw_happens_);
108 } 108 }
109 virtual void ScheduledActionCommit() OVERRIDE { 109 virtual void ScheduledActionCommit() OVERRIDE {
110 actions_.push_back("ScheduledActionCommit"); 110 actions_.push_back("ScheduledActionCommit");
111 states_.push_back(scheduler_->StateAsValueForTesting().release()); 111 states_.push_back(scheduler_->StateAsValueForTesting().release());
112 } 112 }
113 virtual void ScheduledActionUpdateVisibleTiles() OVERRIDE { 113 virtual void ScheduledActionUpdateVisibleTiles() OVERRIDE {
114 actions_.push_back("ScheduledActionUpdateVisibleTiles"); 114 actions_.push_back("ScheduledActionUpdateVisibleTiles");
115 states_.push_back(scheduler_->StateAsValueForTesting().release()); 115 states_.push_back(scheduler_->StateAsValueForTesting().release());
116 } 116 }
117 virtual void ScheduledActionActivatePendingTreeIfNeeded() OVERRIDE { 117 virtual void ScheduledActionActivatePendingTree() OVERRIDE {
118 actions_.push_back("ScheduledActionActivatePendingTreeIfNeeded"); 118 actions_.push_back("ScheduledActionActivatePendingTree");
119 states_.push_back(scheduler_->StateAsValueForTesting().release()); 119 states_.push_back(scheduler_->StateAsValueForTesting().release());
120 } 120 }
121 virtual void ScheduledActionBeginOutputSurfaceCreation() OVERRIDE { 121 virtual void ScheduledActionBeginOutputSurfaceCreation() OVERRIDE {
122 actions_.push_back("ScheduledActionBeginOutputSurfaceCreation"); 122 actions_.push_back("ScheduledActionBeginOutputSurfaceCreation");
123 states_.push_back(scheduler_->StateAsValueForTesting().release()); 123 states_.push_back(scheduler_->StateAsValueForTesting().release());
124 } 124 }
125 virtual void ScheduledActionAcquireLayerTexturesForMainThread() OVERRIDE { 125 virtual void ScheduledActionAcquireLayerTexturesForMainThread() OVERRIDE {
126 actions_.push_back("ScheduledActionAcquireLayerTexturesForMainThread"); 126 actions_.push_back("ScheduledActionAcquireLayerTexturesForMainThread");
127 states_.push_back(scheduler_->StateAsValueForTesting().release()); 127 states_.push_back(scheduler_->StateAsValueForTesting().release());
128 } 128 }
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 641
642 // Get the compositor to do a ScheduledActionDrawAndSwapForced. 642 // Get the compositor to do a ScheduledActionDrawAndSwapForced.
643 scheduler->SetCanDraw(true); 643 scheduler->SetCanDraw(true);
644 scheduler->SetNeedsRedraw(); 644 scheduler->SetNeedsRedraw();
645 scheduler->SetNeedsForcedRedraw(); 645 scheduler->SetNeedsForcedRedraw();
646 EXPECT_TRUE(client.HasAction("ScheduledActionDrawAndSwapForced")); 646 EXPECT_TRUE(client.HasAction("ScheduledActionDrawAndSwapForced"));
647 } 647 }
648 648
649 } // namespace 649 } // namespace
650 } // namespace cc 650 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler_state_machine.cc ('k') | cc/test/fake_layer_tree_host_impl_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698