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

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

Issue 2029323004: Get rid of virtual Display::CreateScheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@onscreendisplayclient
Patch Set: displaytest: unusedvar Created 4 years, 6 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/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 12 matching lines...) Expand all
23 23
24 class CC_SURFACES_EXPORT DisplaySchedulerClient { 24 class CC_SURFACES_EXPORT DisplaySchedulerClient {
25 public: 25 public:
26 virtual ~DisplaySchedulerClient() {} 26 virtual ~DisplaySchedulerClient() {}
27 27
28 virtual bool DrawAndSwap() = 0; 28 virtual bool DrawAndSwap() = 0;
29 }; 29 };
30 30
31 class CC_SURFACES_EXPORT DisplayScheduler : public BeginFrameObserverBase { 31 class CC_SURFACES_EXPORT DisplayScheduler : public BeginFrameObserverBase {
32 public: 32 public:
33 DisplayScheduler(DisplaySchedulerClient* client, 33 DisplayScheduler(BeginFrameSource* begin_frame_source,
34 BeginFrameSource* begin_frame_source,
35 base::SingleThreadTaskRunner* task_runner, 34 base::SingleThreadTaskRunner* task_runner,
36 int max_pending_swaps); 35 int max_pending_swaps);
37 ~DisplayScheduler() override; 36 ~DisplayScheduler() override;
38 37
38 void SetClient(DisplaySchedulerClient* client);
39
39 void SetRootSurfaceResourcesLocked(bool locked); 40 void SetRootSurfaceResourcesLocked(bool locked);
40 void ForceImmediateSwapIfPossible(); 41 void ForceImmediateSwapIfPossible();
41 virtual void DisplayResized(); 42 virtual void DisplayResized();
42 virtual void SetNewRootSurface(SurfaceId root_surface_id); 43 virtual void SetNewRootSurface(SurfaceId root_surface_id);
43 virtual void SurfaceDamaged(SurfaceId surface_id); 44 virtual void SurfaceDamaged(SurfaceId surface_id);
44 45
45 virtual void DidSwapBuffers(); 46 virtual void DidSwapBuffers();
46 void DidSwapBuffersComplete(); 47 void DidSwapBuffersComplete();
47 48
48 void OutputSurfaceLost(); 49 void OutputSurfaceLost();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 91
91 base::WeakPtrFactory<DisplayScheduler> weak_ptr_factory_; 92 base::WeakPtrFactory<DisplayScheduler> weak_ptr_factory_;
92 93
93 private: 94 private:
94 DISALLOW_COPY_AND_ASSIGN(DisplayScheduler); 95 DISALLOW_COPY_AND_ASSIGN(DisplayScheduler);
95 }; 96 };
96 97
97 } // namespace cc 98 } // namespace cc
98 99
99 #endif // CC_SURFACES_DISPLAY_SCHEDULER_H_ 100 #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