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

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

Issue 2411793008: Adds BeginFrameControl via DevTools.
Patch Set: BFC prototype v2 with allow_latency_opts and waiting for BFOs. Created 4 years, 1 month 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/surfaces/display_scheduler.cc ('k') | content/browser/BUILD.gn » ('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/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 14 matching lines...) Expand all
25 public: 25 public:
26 FakeDisplaySchedulerClient() : draw_and_swap_count_(0) {} 26 FakeDisplaySchedulerClient() : draw_and_swap_count_(0) {}
27 27
28 ~FakeDisplaySchedulerClient() override {} 28 ~FakeDisplaySchedulerClient() override {}
29 29
30 bool DrawAndSwap() override { 30 bool DrawAndSwap() override {
31 draw_and_swap_count_++; 31 draw_and_swap_count_++;
32 return true; 32 return true;
33 } 33 }
34 34
35 SurfaceManager* GetSurfaceManager() const override { return nullptr; }
36
35 void Reset() { draw_and_swap_count_ = 0; } 37 void Reset() { draw_and_swap_count_ = 0; }
36 38
37 int draw_and_swap_count() const { return draw_and_swap_count_; } 39 int draw_and_swap_count() const { return draw_and_swap_count_; }
38 40
39 protected: 41 protected:
40 int draw_and_swap_count_; 42 int draw_and_swap_count_;
41 }; 43 };
42 44
43 class TestDisplayScheduler : public DisplayScheduler { 45 class TestDisplayScheduler : public DisplayScheduler {
44 public: 46 public:
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 570
569 scheduler_.SetRootSurfaceResourcesLocked(true); 571 scheduler_.SetRootSurfaceResourcesLocked(true);
570 EXPECT_EQ(++count, scheduler_.scheduler_begin_frame_deadline_count()); 572 EXPECT_EQ(++count, scheduler_.scheduler_begin_frame_deadline_count());
571 573
572 scheduler_.OutputSurfaceLost(); 574 scheduler_.OutputSurfaceLost();
573 EXPECT_EQ(++count, scheduler_.scheduler_begin_frame_deadline_count()); 575 EXPECT_EQ(++count, scheduler_.scheduler_begin_frame_deadline_count());
574 } 576 }
575 577
576 } // namespace 578 } // namespace
577 } // namespace cc 579 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/display_scheduler.cc ('k') | content/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698