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

Side by Side Diff: cc/scheduler/frame_rate_controller.h

Issue 16304003: Unified OutputSurface::SwapBuffers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to 205473 Created 7 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 | Annotate | Revision Log
« no previous file with comments | « cc/output/software_renderer.cc ('k') | cc/scheduler/frame_rate_controller.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_SCHEDULER_FRAME_RATE_CONTROLLER_H_ 5 #ifndef CC_SCHEDULER_FRAME_RATE_CONTROLLER_H_
6 #define CC_SCHEDULER_FRAME_RATE_CONTROLLER_H_ 6 #define CC_SCHEDULER_FRAME_RATE_CONTROLLER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 int NumFramesPendingForTesting() const { return num_frames_pending_; } 56 int NumFramesPendingForTesting() const { return num_frames_pending_; }
57 57
58 // This returns null for unthrottled frame-rate. 58 // This returns null for unthrottled frame-rate.
59 base::TimeTicks NextTickTime(); 59 base::TimeTicks NextTickTime();
60 60
61 // This returns now for unthrottled frame-rate. 61 // This returns now for unthrottled frame-rate.
62 base::TimeTicks LastTickTime(); 62 base::TimeTicks LastTickTime();
63 63
64 void SetTimebaseAndInterval(base::TimeTicks timebase, 64 void SetTimebaseAndInterval(base::TimeTicks timebase,
65 base::TimeDelta interval); 65 base::TimeDelta interval);
66 bool swap_buffers_complete_supported() const;
67 void SetSwapBuffersCompleteSupported(bool supported);
68 66
69 protected: 67 protected:
70 friend class FrameRateControllerTimeSourceAdapter; 68 friend class FrameRateControllerTimeSourceAdapter;
71 void OnTimerTick(); 69 void OnTimerTick();
72 70
73 void PostManualTick(); 71 void PostManualTick();
74 void ManualTick(); 72 void ManualTick();
75 73
76 FrameRateControllerClient* client_; 74 FrameRateControllerClient* client_;
77 int num_frames_pending_; 75 int num_frames_pending_;
78 int max_frames_pending_; 76 int max_frames_pending_;
79 scoped_refptr<TimeSource> time_source_; 77 scoped_refptr<TimeSource> time_source_;
80 scoped_ptr<FrameRateControllerTimeSourceAdapter> time_source_client_adapter_; 78 scoped_ptr<FrameRateControllerTimeSourceAdapter> time_source_client_adapter_;
81 bool active_; 79 bool active_;
82 bool swap_buffers_complete_supported_;
83 80
84 // Members for unthrottled frame-rate. 81 // Members for unthrottled frame-rate.
85 bool is_time_source_throttling_; 82 bool is_time_source_throttling_;
86 base::WeakPtrFactory<FrameRateController> weak_factory_; 83 base::WeakPtrFactory<FrameRateController> weak_factory_;
87 Thread* thread_; 84 Thread* thread_;
88 85
89 DISALLOW_COPY_AND_ASSIGN(FrameRateController); 86 DISALLOW_COPY_AND_ASSIGN(FrameRateController);
90 }; 87 };
91 88
92 } // namespace cc 89 } // namespace cc
93 90
94 #endif // CC_SCHEDULER_FRAME_RATE_CONTROLLER_H_ 91 #endif // CC_SCHEDULER_FRAME_RATE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « cc/output/software_renderer.cc ('k') | cc/scheduler/frame_rate_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698