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

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: Splitting dropped counts for normal and missed begin frame messages. 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 f7e5bf6a368b93a47f257483afe58d5b78e99933..0282e1981fccf1cffe6424feb253692dd5518e72 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -234,6 +234,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),
@@ -1432,7 +1433,7 @@ void LayerTreeHostImpl::SetNeedsRedrawRect(const gfx::Rect& damage_rect) {
}
void LayerTreeHostImpl::BeginFrame(const BeginFrameArgs& args) {
- client_->BeginFrame(args);
+ CallOnBeginFrame(args);
}
void LayerTreeHostImpl::DidSwapBuffers() {
@@ -1672,7 +1673,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
@@ -3153,6 +3159,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