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

Side by Side Diff: cc/surfaces/display_scheduler_unittest.cc

Issue 1821863002: Hook up ui::Compositor to Display's BeginFrameSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase; refactor mus output surface Created 4 years, 8 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 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/surfaces/display_scheduler.h" 5 #include "cc/surfaces/display_scheduler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/test/null_task_runner.h" 8 #include "base/test/null_task_runner.h"
9 #include "base/test/simple_test_tick_clock.h" 9 #include "base/test/simple_test_tick_clock.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 10 matching lines...) Expand all
21 class FakeDisplaySchedulerClient : public DisplaySchedulerClient { 21 class FakeDisplaySchedulerClient : public DisplaySchedulerClient {
22 public: 22 public:
23 FakeDisplaySchedulerClient() : draw_and_swap_count_(0) {} 23 FakeDisplaySchedulerClient() : draw_and_swap_count_(0) {}
24 24
25 ~FakeDisplaySchedulerClient() override {} 25 ~FakeDisplaySchedulerClient() override {}
26 26
27 bool DrawAndSwap() override { 27 bool DrawAndSwap() override {
28 draw_and_swap_count_++; 28 draw_and_swap_count_++;
29 return true; 29 return true;
30 } 30 }
31 void UpdateSchedulerBeginFrameSource(BeginFrameSource* source) override {}
31 32
32 void Reset() { draw_and_swap_count_ = 0; } 33 void Reset() { draw_and_swap_count_ = 0; }
33 34
34 int draw_and_swap_count() const { return draw_and_swap_count_; } 35 int draw_and_swap_count() const { return draw_and_swap_count_; }
35 36
36 protected: 37 protected:
37 int draw_and_swap_count_; 38 int draw_and_swap_count_;
38 }; 39 };
39 40
40 class TestDisplayScheduler : public DisplayScheduler { 41 class TestDisplayScheduler : public DisplayScheduler {
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 438
438 scheduler_->SetRootSurfaceResourcesLocked(true); 439 scheduler_->SetRootSurfaceResourcesLocked(true);
439 EXPECT_EQ(count++, scheduler_->scheduler_begin_frame_deadline_count()); 440 EXPECT_EQ(count++, scheduler_->scheduler_begin_frame_deadline_count());
440 441
441 scheduler_->OutputSurfaceLost(); 442 scheduler_->OutputSurfaceLost();
442 EXPECT_EQ(count++, scheduler_->scheduler_begin_frame_deadline_count()); 443 EXPECT_EQ(count++, scheduler_->scheduler_begin_frame_deadline_count());
443 } 444 }
444 445
445 } // namespace 446 } // namespace
446 } // namespace cc 447 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698