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

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

Issue 2591013004: [cc] Add and use BeginFrameAck for DidFinishFrame. (Closed)
Patch Set: remove ipc struct traits for BeginFrameAck. Created 3 years, 11 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/scheduler/scheduler_state_machine.h ('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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 void OutputSurfaceLost(); 49 void OutputSurfaceLost();
50 50
51 // BeginFrameObserverBase implementation 51 // BeginFrameObserverBase implementation
52 bool OnBeginFrameDerivedImpl(const BeginFrameArgs& args) override; 52 bool OnBeginFrameDerivedImpl(const BeginFrameArgs& args) override;
53 void OnBeginFrameSourcePausedChanged(bool paused) override; 53 void OnBeginFrameSourcePausedChanged(bool paused) override;
54 54
55 protected: 55 protected:
56 base::TimeTicks DesiredBeginFrameDeadlineTime(); 56 base::TimeTicks DesiredBeginFrameDeadlineTime();
57 virtual void ScheduleBeginFrameDeadline(); 57 virtual void ScheduleBeginFrameDeadline();
58 void AttemptDrawAndSwap(); 58 bool AttemptDrawAndSwap();
59 void OnBeginFrameDeadline(); 59 void OnBeginFrameDeadline();
60 void DrawAndSwap(); 60 bool DrawAndSwap();
61 void StartObservingBeginFrames(); 61 void StartObservingBeginFrames();
62 void StopObservingBeginFrames(); 62 void StopObservingBeginFrames();
63 bool ShouldDraw(); 63 bool ShouldDraw();
64 void DidFinishFrame(bool did_draw);
64 65
65 DisplaySchedulerClient* client_; 66 DisplaySchedulerClient* client_;
66 BeginFrameSource* begin_frame_source_; 67 BeginFrameSource* begin_frame_source_;
67 base::SingleThreadTaskRunner* task_runner_; 68 base::SingleThreadTaskRunner* task_runner_;
68 69
69 BeginFrameArgs current_begin_frame_args_; 70 BeginFrameArgs current_begin_frame_args_;
70 base::Closure begin_frame_deadline_closure_; 71 base::Closure begin_frame_deadline_closure_;
71 base::CancelableClosure begin_frame_deadline_task_; 72 base::CancelableClosure begin_frame_deadline_task_;
72 base::TimeTicks begin_frame_deadline_task_time_; 73 base::TimeTicks begin_frame_deadline_task_time_;
73 74
(...skipping 24 matching lines...) Expand all
98 99
99 base::WeakPtrFactory<DisplayScheduler> weak_ptr_factory_; 100 base::WeakPtrFactory<DisplayScheduler> weak_ptr_factory_;
100 101
101 private: 102 private:
102 DISALLOW_COPY_AND_ASSIGN(DisplayScheduler); 103 DISALLOW_COPY_AND_ASSIGN(DisplayScheduler);
103 }; 104 };
104 105
105 } // namespace cc 106 } // namespace cc
106 107
107 #endif // CC_SURFACES_DISPLAY_SCHEDULER_H_ 108 #endif // CC_SURFACES_DISPLAY_SCHEDULER_H_
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler_state_machine.h ('k') | cc/surfaces/display_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698