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

Side by Side Diff: cc/surfaces/display_scheduler.h

Issue 1821863002: Hook up ui::Compositor to Display's BeginFrameSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: BrowserCompositorOutputSurface owns;scheduler decides 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
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 #ifndef CC_SURFACES_DISPLAY_SCHEDULER_H_ 5 #ifndef CC_SURFACES_DISPLAY_SCHEDULER_H_
6 #define CC_SURFACES_DISPLAY_SCHEDULER_H_ 6 #define CC_SURFACES_DISPLAY_SCHEDULER_H_
7 7
8 #include "base/cancelable_callback.h" 8 #include "base/cancelable_callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/single_thread_task_runner.h" 12 #include "base/single_thread_task_runner.h"
13 #include "cc/scheduler/begin_frame_source.h" 13 #include "cc/scheduler/begin_frame_source.h"
14 #include "cc/surfaces/surface_id.h" 14 #include "cc/surfaces/surface_id.h"
15 #include "cc/surfaces/surfaces_export.h" 15 #include "cc/surfaces/surfaces_export.h"
16 16
17 namespace cc { 17 namespace cc {
18 18
19 class OutputSurface; 19 class OutputSurface;
20 class BeginFrameSource; 20 class BeginFrameSource;
21 21
22 class CC_SURFACES_EXPORT DisplaySchedulerClient { 22 class CC_SURFACES_EXPORT DisplaySchedulerClient {
23 public: 23 public:
24 virtual ~DisplaySchedulerClient() {} 24 virtual ~DisplaySchedulerClient() {}
25 25
26 virtual bool DrawAndSwap() = 0; 26 virtual bool DrawAndSwap() = 0;
27 virtual void UpdateSchedulerBeginFrameSource(BeginFrameSource* source) = 0;
27 }; 28 };
28 29
29 class CC_SURFACES_EXPORT DisplayScheduler : public BeginFrameObserverBase { 30 class CC_SURFACES_EXPORT DisplayScheduler : public BeginFrameObserverBase {
30 public: 31 public:
31 DisplayScheduler(DisplaySchedulerClient* client, 32 DisplayScheduler(DisplaySchedulerClient* client,
32 BeginFrameSource* begin_frame_source, 33 BeginFrameSource* begin_frame_source,
33 base::SingleThreadTaskRunner* task_runner, 34 base::SingleThreadTaskRunner* task_runner,
34 int max_pending_swaps); 35 int max_pending_swaps);
35 ~DisplayScheduler() override; 36 ~DisplayScheduler() override;
36 37
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 96
96 base::WeakPtrFactory<DisplayScheduler> weak_ptr_factory_; 97 base::WeakPtrFactory<DisplayScheduler> weak_ptr_factory_;
97 98
98 private: 99 private:
99 DISALLOW_COPY_AND_ASSIGN(DisplayScheduler); 100 DISALLOW_COPY_AND_ASSIGN(DisplayScheduler);
100 }; 101 };
101 102
102 } // namespace cc 103 } // namespace cc
103 104
104 #endif // CC_SURFACES_DISPLAY_SCHEDULER_H_ 105 #endif // CC_SURFACES_DISPLAY_SCHEDULER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698