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

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: Rebasing onto master. Created 6 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
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 7f6ae44ff74ef374156cae786bf66e6d54bdcd0a..dfddb1caaf9190f2bfc975cc973e7a67750fbcf1 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -213,7 +213,8 @@ LayerTreeHostImpl::LayerTreeHostImpl(
RenderingStatsInstrumentation* rendering_stats_instrumentation,
SharedBitmapManager* manager,
int id)
- : client_(client),
+ : BaseBeginFrameSource(0),
+ client_(client),
proxy_(proxy),
use_gpu_rasterization_(false),
input_handler_client_(NULL),
@@ -1329,7 +1330,7 @@ void LayerTreeHostImpl::SetNeedsRedrawRect(const gfx::Rect& damage_rect) {
}
void LayerTreeHostImpl::BeginFrame(const BeginFrameArgs& args) {
- client_->BeginFrame(args);
+ frame_sink_->BeginFrame(args);
}
void LayerTreeHostImpl::DidSwapBuffers() {
@@ -1564,11 +1565,15 @@ bool LayerTreeHostImpl::SwapBuffers(const LayerTreeHostImpl::FrameData& frame) {
return true;
}
-void LayerTreeHostImpl::SetNeedsBeginFrame(bool enable) {
+void LayerTreeHostImpl::OnGenerateChange(bool generate_frames) {
if (output_surface_)
- output_surface_->SetNeedsBeginFrame(enable);
+ output_surface_->SetNeedsBeginFrame(generate_frames);
else
- DCHECK(!enable);
+ DCHECK(!generate_frames);
+}
+
+std::string LayerTreeHostImpl::TypeString() const {
+ return "LayerTreeHostImpl";
}
void LayerTreeHostImpl::WillBeginImplFrame(const BeginFrameArgs& args) {

Powered by Google App Engine
This is Rietveld 408576698