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

Side by Side Diff: blimp/engine/renderer/frame_scheduler.h

Issue 2445093002: cc/blimp: Add synchronization for scroll/scale state. (Closed)
Patch Set: minor fix 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 BLIMP_ENGINE_RENDERER_FRAME_SCHEDULER_H_ 5 #ifndef BLIMP_ENGINE_RENDERER_FRAME_SCHEDULER_H_
6 #define BLIMP_ENGINE_RENDERER_FRAME_SCHEDULER_H_ 6 #define BLIMP_ENGINE_RENDERER_FRAME_SCHEDULER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
(...skipping 26 matching lines...) Expand all
37 37
38 // Called when the |client| wants to start a frame update on the engine. 38 // Called when the |client| wants to start a frame update on the engine.
39 void ScheduleFrameUpdate(); 39 void ScheduleFrameUpdate();
40 40
41 // Called when a frame update is sent to the client. 41 // Called when a frame update is sent to the client.
42 void DidSendFrameUpdateToClient(); 42 void DidSendFrameUpdateToClient();
43 43
44 // Called when an Ack is received for a frame sent to the client. 44 // Called when an Ack is received for a frame sent to the client.
45 void DidReceiveFrameUpdateAck(); 45 void DidReceiveFrameUpdateAck();
46 46
47 bool needs_frame_update() const { return needs_frame_update_; }
48
47 base::TimeTicks next_frame_time() const { return next_frame_time_; } 49 base::TimeTicks next_frame_time() const { return next_frame_time_; }
48 50
49 protected: 51 protected:
50 // protected for testing. 52 // protected for testing.
51 FrameScheduler(base::TimeDelta frame_delay, 53 FrameScheduler(base::TimeDelta frame_delay,
52 scoped_refptr<base::SingleThreadTaskRunner> task_runner, 54 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
53 FrameSchedulerClient* client); 55 FrameSchedulerClient* client);
54 56
55 private: 57 private:
56 void ScheduleFrameUpdateIfNecessary(); 58 void ScheduleFrameUpdateIfNecessary();
(...skipping 22 matching lines...) Expand all
79 81
80 FrameSchedulerClient* client_; 82 FrameSchedulerClient* client_;
81 83
82 DISALLOW_COPY_AND_ASSIGN(FrameScheduler); 84 DISALLOW_COPY_AND_ASSIGN(FrameScheduler);
83 }; 85 };
84 86
85 } // namespace engine 87 } // namespace engine
86 } // namespace blimp 88 } // namespace blimp
87 89
88 #endif // BLIMP_ENGINE_RENDERER_FRAME_SCHEDULER_H_ 90 #endif // BLIMP_ENGINE_RENDERER_FRAME_SCHEDULER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698