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

Unified Diff: cc/trees/layer_tree_host_impl.h

Issue 787763006: cc: Adding BeginFrameTracker object and removing Now() from LTHI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
Index: cc/trees/layer_tree_host_impl.h
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index 54a16aa819d946c0c28f5545452285a0913cee22..947ea347dfd4275c9b23938b551691a0e2149e3a 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -32,6 +32,7 @@
#include "cc/quads/render_pass.h"
#include "cc/resources/resource_provider.h"
#include "cc/resources/tile_manager.h"
+#include "cc/scheduler/begin_frame_tracker.h"
#include "cc/scheduler/draw_result.h"
#include "skia/ext/refptr.h"
#include "third_party/skia/include/core/SkColor.h"
@@ -431,14 +432,15 @@ class CC_EXPORT LayerTreeHostImpl
void SetTreePriority(TreePriority priority);
TreePriority GetTreePriority() const;
+ // TODO(mithro): Remove these methods which expose control of the internal
+ // BeginFrameArgs to external callers. LayerTreeHostImpl should manage its
+ // own frame time based on WillBeginImplFrame and other methods.
void UpdateCurrentBeginFrameArgs(const BeginFrameArgs& args);
void ResetCurrentBeginFrameArgsForNextFrame();
virtual BeginFrameArgs CurrentBeginFrameArgs() const;
// Expected time between two begin impl frame calls.
- base::TimeDelta begin_impl_frame_interval() const {
- return begin_impl_frame_interval_;
- }
+ base::TimeDelta CurrentBeginFrameInterval() const;
void AsValueInto(base::debug::TracedValue* value) const;
void AsValueWithFrameInto(FrameData* frame,
@@ -528,6 +530,9 @@ class CC_EXPORT LayerTreeHostImpl
LayerTreeHostImplClient* client_;
Proxy* proxy_;
+ BeginFrameTracker current_begin_frame_args_ =
+ BeginFrameTracker(BEGINFRAMETRACKER_FROM_HERE);
+
private:
void CreateAndSetRenderer();
void CreateAndSetTileManager();
@@ -701,11 +706,6 @@ class CC_EXPORT LayerTreeHostImpl
gfx::Rect viewport_damage_rect_;
- BeginFrameArgs current_begin_frame_args_;
-
- // Expected time between two begin impl frame calls.
- base::TimeDelta begin_impl_frame_interval_;
-
scoped_ptr<AnimationRegistrar> animation_registrar_;
RenderingStatsInstrumentation* rendering_stats_instrumentation_;

Powered by Google App Engine
This is Rietveld 408576698