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

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

Issue 2565783002: Moves ownership of the cc::Display's BeginFrameSource out of Display. (Closed)
Patch Set: rebase. Created 4 years 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.cc ('k') | cc/surfaces/display_scheduler.cc » ('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 #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 <memory> 8 #include <memory>
9 9
10 #include "base/cancelable_callback.h" 10 #include "base/cancelable_callback.h"
(...skipping 11 matching lines...) Expand all
22 22
23 class CC_SURFACES_EXPORT DisplaySchedulerClient { 23 class CC_SURFACES_EXPORT DisplaySchedulerClient {
24 public: 24 public:
25 virtual ~DisplaySchedulerClient() {} 25 virtual ~DisplaySchedulerClient() {}
26 26
27 virtual bool DrawAndSwap() = 0; 27 virtual bool DrawAndSwap() = 0;
28 }; 28 };
29 29
30 class CC_SURFACES_EXPORT DisplayScheduler : public BeginFrameObserverBase { 30 class CC_SURFACES_EXPORT DisplayScheduler : public BeginFrameObserverBase {
31 public: 31 public:
32 DisplayScheduler(BeginFrameSource* begin_frame_source, 32 DisplayScheduler(base::SingleThreadTaskRunner* task_runner,
33 base::SingleThreadTaskRunner* task_runner,
34 int max_pending_swaps); 33 int max_pending_swaps);
35 ~DisplayScheduler() override; 34 ~DisplayScheduler() override;
36 35
37 void SetClient(DisplaySchedulerClient* client); 36 void SetClient(DisplaySchedulerClient* client);
37 void SetBeginFrameSource(BeginFrameSource* begin_frame_source);
38 38
39 void SetVisible(bool visible); 39 void SetVisible(bool visible);
40 void SetRootSurfaceResourcesLocked(bool locked); 40 void SetRootSurfaceResourcesLocked(bool locked);
41 void ForceImmediateSwapIfPossible(); 41 void ForceImmediateSwapIfPossible();
42 virtual void DisplayResized(); 42 virtual void DisplayResized();
43 virtual void SetNewRootSurface(const SurfaceId& root_surface_id); 43 virtual void SetNewRootSurface(const SurfaceId& root_surface_id);
44 virtual void SurfaceDamaged(const SurfaceId& surface_id); 44 virtual void SurfaceDamaged(const SurfaceId& surface_id);
45 45
46 virtual void DidSwapBuffers(); 46 virtual void DidSwapBuffers();
47 void DidReceiveSwapBuffersAck(); 47 void DidReceiveSwapBuffersAck();
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 base::WeakPtrFactory<DisplayScheduler> weak_ptr_factory_; 99 base::WeakPtrFactory<DisplayScheduler> weak_ptr_factory_;
100 100
101 private: 101 private:
102 DISALLOW_COPY_AND_ASSIGN(DisplayScheduler); 102 DISALLOW_COPY_AND_ASSIGN(DisplayScheduler);
103 }; 103 };
104 104
105 } // namespace cc 105 } // namespace cc
106 106
107 #endif // CC_SURFACES_DISPLAY_SCHEDULER_H_ 107 #endif // CC_SURFACES_DISPLAY_SCHEDULER_H_
OLDNEW
« no previous file with comments | « cc/surfaces/display.cc ('k') | cc/surfaces/display_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698