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

Unified Diff: cc/scheduler/scheduler_state_machine.h

Issue 16833003: cc: Emulate BeginFrame in OutputSurfaces that don't support it natively (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/scheduler/scheduler_settings.cc ('k') | cc/scheduler/scheduler_state_machine.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/scheduler_state_machine.h
diff --git a/cc/scheduler/scheduler_state_machine.h b/cc/scheduler/scheduler_state_machine.h
index 1be07496931c8b8f4c0cf7e779b2ce145d2ba863..59e940c518ce2516b08bce3d3ac89e7675ea38a9 100644
--- a/cc/scheduler/scheduler_state_machine.h
+++ b/cc/scheduler/scheduler_state_machine.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/time.h"
#include "cc/base/cc_export.h"
#include "cc/scheduler/scheduler_settings.h"
@@ -78,7 +79,9 @@ class CC_EXPORT SchedulerStateMachine {
// The scheduler will not draw more than once in a given BeginFrame
// callback.
void DidEnterBeginFrame();
+ void SetFrameTime(base::TimeTicks frame_time);
void DidLeaveBeginFrame();
+ bool inside_begin_frame() const { return inside_begin_frame_; }
// Indicates whether the LayerTreeHostImpl is visible.
void SetVisible(bool visible);
@@ -168,6 +171,7 @@ class CC_EXPORT SchedulerStateMachine {
const SchedulerSettings settings_;
CommitState commit_state_;
+ int commit_count_;
int current_frame_number_;
int last_frame_number_where_draw_was_called_;
@@ -184,6 +188,7 @@ class CC_EXPORT SchedulerStateMachine {
bool expect_immediate_begin_frame_for_main_thread_;
bool main_thread_needs_layer_textures_;
bool inside_begin_frame_;
+ base::TimeTicks last_frame_time_;
bool visible_;
bool can_start_;
bool can_draw_;
@@ -193,6 +198,7 @@ class CC_EXPORT SchedulerStateMachine {
OutputSurfaceState output_surface_state_;
bool did_create_and_initialize_first_output_surface_;
+ private:
DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine);
};
« no previous file with comments | « cc/scheduler/scheduler_settings.cc ('k') | cc/scheduler/scheduler_state_machine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698