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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 267783004: Refactoring the way begin frame sources inside scheduler work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase onto master. Created 6 years, 3 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
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 07dc6c8f51558136e5ddf376f71f8f5c274b45df..42c99e454281d1c4e2aca3d4e774d5641ccc3978 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -229,6 +229,7 @@ LayerTreeHostImpl::LayerTreeHostImpl(
int id)
: client_(client),
proxy_(proxy),
+ needs_begin_frames_(false),
use_gpu_rasterization_(false),
input_handler_client_(NULL),
did_lock_scrolling_layer_(false),
@@ -1429,7 +1430,7 @@ void LayerTreeHostImpl::SetNeedsRedrawRect(const gfx::Rect& damage_rect) {
}
void LayerTreeHostImpl::BeginFrame(const BeginFrameArgs& args) {
- client_->BeginFrame(args);
+ CallOnBeginFrame(args);
}
void LayerTreeHostImpl::DidSwapBuffers() {
@@ -1669,7 +1670,12 @@ bool LayerTreeHostImpl::SwapBuffers(const LayerTreeHostImpl::FrameData& frame) {
return true;
}
-void LayerTreeHostImpl::SetNeedsBeginFrame(bool enable) {
+bool LayerTreeHostImpl::NeedsBeginFrames() const {
+ return needs_begin_frames_;
+}
+
+void LayerTreeHostImpl::SetNeedsBeginFrames(bool enable) {
+ needs_begin_frames_ = enable;
if (output_surface_)
output_surface_->SetNeedsBeginFrame(enable);
else
@@ -3147,6 +3153,10 @@ BeginFrameArgs LayerTreeHostImpl::CurrentBeginFrameArgs() const {
BeginFrameArgs::DefaultInterval());
}
+void LayerTreeHostImpl::AsValueInto(base::debug::TracedValue* value) const {
+ return AsValueWithFrameInto(NULL, value);
+}
+
scoped_refptr<base::debug::ConvertableToTraceFormat>
LayerTreeHostImpl::AsValue() const {
return AsValueWithFrame(NULL);

Powered by Google App Engine
This is Rietveld 408576698